Skip to content
Toolify

How to Compress a PDF File (and What Actually Shrinks It)

September 23, 20266 min readWhy PDFs get large, the difference between structural bloat and heavy images, and how to pick the right compression mode for each.

A bloated PDF is a common headache — it’s too big to email, slow to upload, and eats storage for no good reason. But “compress a PDF” actually means different things depending on why the file is large in the first place. Here’s what really shrinks a PDF, and how to pick the right approach.

Why PDFs get big

There are two very different causes of a large PDF, and they call for different fixes:

  • Bloated internal structure. PDFs created or edited by certain software can accumulate redundant objects, uncompressed streams, or duplicated resources. The visible content might be simple, but the file underneath is messy.
  • Heavy embedded images. Scanned documents and PDFs full of high-resolution photos are large because the images inside them are large — this is by far the most common cause of a multi-megabyte PDF.

Two honest compression modes

The Compress PDF tool offers two real, clearly different approaches instead of pretending one setting fits every file:

  • Quick compress re-saves the PDF with a tighter internal structure (using pdf-lib’s object streams). Your text stays fully selectable and searchable. This helps most when the bloat is structural — but if your PDF is large because of its images, don’t expect much from this mode alone.
  • Maximum compression rasterizes every page into a compressed JPEG image at a quality level you choose, then rebuilds the PDF from those images. This can shrink image-heavy or scanned PDFs dramatically — often by 70–90% — but the tradeoff is real: the whole document becomes an image, so text is no longer selectable, searchable, or copy-pasteable.

Neither mode does surgical, per-image recompression while leaving vector text untouched — that requires low-level parsing of each embedded image stream inside the PDF, which is a much deeper (and more fragile) operation than a general-purpose browser tool can safely attempt. What you get instead are two honest, predictable options.

Which mode should you use?

  1. Try Quick compress first — it’s free of downsides and preserves selectable text.
  2. If the file is still too large and it’s mostly scanned pages or photos, switch to Maximum compression.
  3. Adjust the JPEG quality slider — start around 50–60% and increase it if pages start looking noticeably soft.
  4. Check the before/after size shown after each attempt before deciding to download.

When compression won’t help much

If a PDF is already well-optimized — clean structure, reasonably sized images — Quick compress may barely change the file size, and that’s expected rather than a bug. In that case, Maximum compression is the only way to shrink it further, at the cost of selectable text.

A note on privacy

Both compression modes run entirely in your browser using pdf-lib and pdfjs. Your PDF is never uploaded to a server — the whole process, from reading the file to generating the compressed version, happens on your own device.

Tools mentioned in this guide