Compress PDF

Drop a PDF and get a smaller version back. We re-save with object streams and compressed cross-reference tables — losslessly. Best for PDFs that were exported without compression; modest savings on PDFs that were already optimized.

Why compress a PDF?

How it works

Your PDF is loaded with pdf-lib (with ignoreEncryption set, so PDFs locked only by owner restrictions still work). It's re-saved with two pdf-lib options: useObjectStreams=true, which packs many small PDF objects into single compressed streams, and the default cross-reference table compression. The before / after sizes are reported. Note: this is structural compression only — it shrinks how the PDF's metadata and small objects are stored, but does not re-encode embedded images or fonts. PDFs that were already exported with compression on (most modern outputs from Word, Google Docs, Acrobat) will see modest savings. PDFs exported uncompressed (some older tools, some scanner outputs) can shrink dramatically.

Frequently asked questions

Why didn't my PDF get smaller?

If the PDF was already compressed by its creator (most modern Word/Google Docs/Acrobat exports), there's not much structural overhead left to squeeze. Real size reduction on already-compressed PDFs requires re-encoding embedded images at lower quality (a lossy operation), which this tool doesn't currently do. For aggressive size reduction, use a desktop tool like Acrobat's 'Reduce File Size' or Ghostscript with /screen settings.

Will the compression be lossy?

No. We only re-pack the PDF's structural data (object streams + xref compression). Text, images, and fonts aren't re-encoded — pixel-for-pixel and character-for-character identical to the input. Lossy image re-encoding (which is how Acrobat gets dramatic reductions) is on the roadmap as a separate option.

Why is the output sometimes the same size or slightly larger?

If your PDF was already saved with optimal structural compression, our re-save can't beat it — and in rare cases (e.g., very small PDFs where the object-stream overhead outweighs its savings) it can be a few bytes larger. Compare the before/after sizes shown after compression and use the smaller one.

Will scanned PDFs shrink dramatically?

Probably not from this tool. Scanned PDFs are mostly large embedded images — those bytes pass through untouched. For scans, the right move is downsampling and re-encoding the images via a desktop tool, or rasterizing at a lower DPI.

Are my files uploaded?

No. pdf-lib runs in your browser. The PDF stays on your device through the entire compression.

About this tool

PDF compression has a wide range of meanings depending on what kind of waste is in the file. PDFs exported without compression — older tools, some scanners, some 'Save as PDF' shortcuts — carry significant structural overhead that can be re-packed losslessly for substantial savings. PDFs that were already compressed at export (most modern Office and Acrobat outputs) only have small structural gains left and need lossy image re-encoding for further reduction. This tool does the safe lossless half: re-save with pdf-lib's object-stream and xref compression and report the size delta. For aggressive lossy compression, Acrobat's 'Reduce File Size' or Ghostscript's /screen preset is still the right desktop answer.