ToolsBench

How PDF Compression Works (and When It Hurts Quality)

6 min read · Tools-Bench Learn

PDFs have a reputation for mysterious file sizes. One ten-page contract is 90 KB; another is 40 MB. The difference is almost never the text — it's what's embedded alongside it. Understanding what's inside a PDF explains both why compression works so well on some files and why it barely touches others.

This guide covers what makes PDFs large, what a compressor actually does, and the cases where you should think twice before compressing.

What makes a PDF large

Text in a PDF is tiny. A page of pure text is a few kilobytes of drawing instructions — the fonts add a bit more, and even those are usually subset so only the characters actually used are embedded. If your PDF contains only text and it's still huge, something else is going on.

That something is nearly always images. A PDF produced by a scanner is just a stack of full-page images — often 200–300 DPI, sometimes stored with little or no compression. Reports with photos, slide decks exported to PDF, and design proofs carry the same weight. A single uncompressed full-page scan at 300 DPI is roughly 25 MB of raw pixel data; multiply by pages and you see where the 40 MB contract came from.

Minor contributors include fully-embedded (non-subset) fonts, duplicated resources from careless generators, deleted-but-retained old versions of pages, and metadata. These usually account for hundreds of kilobytes, not tens of megabytes.

What a compressor actually does

PDF compression is mostly image processing. The compressor finds every image in the document and applies two operations: downsampling — reducing the image's resolution to something appropriate for viewing (a 300 DPI scan displayed on a screen looks identical at 150 DPI) — and re-encoding, converting the pixels to an efficient lossy format like JPEG at a sensible quality level.

Beyond images, the compressor rebuilds the file's internal structure: removing unused objects, deduplicating repeated resources, compressing the text streams, and dropping old page versions left behind by incremental saves. On a well-made text PDF this structural pass might save 10–20%; on an image-heavy file, the image pass routinely saves 80–95%.

When compression hurts — and when it can't

Because the savings come from lossy image re-encoding, the risk is concentrated where the images matter. Downsampling a 300 DPI scan to 100 DPI is invisible on screen but visibly degrades a subsequent print. Aggressive JPEG quality can blur fine print, faint stamps and signatures on scanned documents. And documents destined for legal submission or archival often have resolution requirements — check them before compressing.

Text, on the other hand, is safe. Real text in a PDF (as opposed to a picture of text) is vector data — compression cannot blur it, and it stays razor-sharp at any zoom level. If your PDF came from Word, Google Docs or LaTeX rather than a scanner, compression will not touch its readability.

Practical guidance

A few rules of thumb before you hit compress:

  • Screen reading and email: compress freely — 100–150 DPI images are indistinguishable on screens.
  • Will be printed: keep images at 200–300 DPI, or skip heavy compression entirely.
  • Scanned contracts and IDs: compress gently and check the result — stamps, seals and signatures degrade first.
  • Already-compressed PDFs: expect little further savings; re-compressing lossy images mostly adds artifacts.
  • Keep the original file until you've verified the compressed copy is acceptable.

Compressing without uploading

Most online PDF compressors upload your document to their server, process it there, and let you download the result — meaning your contract, medical record or financial statement briefly lives on someone else's machine. Tools-Bench's PDF compressor works differently: the whole pipeline runs in your browser via WebAssembly. The file never leaves your device, which for confidential documents is not a convenience but the entire point.

Frequently asked questions

Why did my PDF barely shrink?

It was probably already efficient — mostly real text, subset fonts, and images that were compressed when the file was made. Compression has big wins only when there's image weight to remove.

Does compressing a PDF affect the text quality?

Not if it's real text — vector text stays perfectly sharp at any compression level. Scanned documents are different: there the "text" is an image, and aggressive compression can blur it.

Is it safe to compress a signed PDF?

Visually yes, legally maybe not: rewriting the file invalidates cryptographic digital signatures (the certificate kind). A drawn signature image survives fine. If the document carries a digital certificate, keep the original untouched.

Try it yourself