Skip to main content

PDF Compressor

Reduce PDF file size in your browser using pdf-lib re-serialisation, with size comparison and download.

PDF compressor reduces the file size of any PDF by re-serialising it with pdf-lib, removing unused objects. Upload a PDF to see the original and compressed sizes side by side. Download the compressed file instantly. All processing runs in the browser with no server upload.

Drop a PDF here or click to upload

PDF files only — processed entirely in your browser

Your PDF is processed entirely in your browser and never uploaded to any server.

Frequently Asked Questions

How much can PDF compressor reduce file size?
Results vary by PDF content. Text-heavy PDFs with redundant objects can shrink 10 to 40%. Scanned PDFs where most of the size is image data see minimal reduction, typically under 5%. PDFs already optimised by professional tools may see little change.
Does PDF compression reduce image quality?
No. The tool re-serialises the PDF structure using pdf-lib. Unused objects are removed and the cross-reference table is regenerated, but images are not re-encoded. Image quality and visual appearance are preserved.
Is the PDF uploaded to a server?
No. The PDF is loaded into browser memory by the FileReader API and processed by pdf-lib entirely client-side. No file is sent to any server.
What types of PDFs benefit most from compression?
PDFs exported from word processors, design tools, or older PDF generators often contain redundant or unoptimised internal structures. Re-serialisation removes these. PDFs that were already exported with full optimisation (such as from Acrobat's Reduce File Size command) benefit less.
What is pdf-lib re-serialisation?
pdf-lib reads all objects in the PDF (pages, fonts, images, metadata) and writes them back to a new binary stream. The new file has a clean object tree and a regenerated cross-reference table. The result is typically more compact than the original.

What is the PDF compressor?

The PDF compressor reduces file size by re-serialising the PDF using pdf-lib. pdf-lib is an open-source JavaScript library for reading and writing PDFs. The original PDF often contains unused objects and fragmented cross-reference tables. Re-serialisation removes all of that and writes a clean, compact output.

Upload a PDF to see the original and compressed file sizes side by side. Click Download to save the compressed version. All processing runs in the browser with no server upload.

How PDF compression works

A PDF file consists of objects: page trees, content streams, font dictionaries, image streams, and metadata. Each edit appends new object versions and marks old ones as deleted without physical removal. The cross-reference table grows with each save. Incremental updates add content to the end of the file rather than rewriting it.

pdf-lib reads all objects, resolves all references, and discards obsolete versions. A fresh binary output is written with a single compact cross-reference table. The result is a smaller, cleaner file that contains the same content.

Limitations of browser-based PDF compression

pdf-lib does not re-encode images. A PDF dominated by embedded JPEG or PNG images will not shrink much, because the image data is untouched. For heavy size reduction on scanned documents or photo books, use specialised compression that re-encodes images at lower quality.

PDFs already optimised by Adobe Acrobat's Optimised command will show minimal improvement, as the same cleanup has already been done.

Password-protected PDFs cannot be processed without the password. The tool will show an error for encrypted files.

When to compress a PDF

  • Email attachments: most email providers limit attachments to 10 to 25 MB. Compress before sending large PDFs to stay within limits.
  • Web uploads: government portals, university application systems, and insurance claim portals commonly restrict uploads to 1 to 5 MB. Compress to meet the limit without losing content.
  • WhatsApp document sharing: WhatsApp limits document uploads to 100 MB but recommends files under 16 MB for fast delivery. Compress large PDFs before sharing.
  • Cloud storage: compressing PDFs before archiving saves quota on Google Drive, OneDrive, and Dropbox over time.