How to compress a PDF without losing quality

·5 min read

"Compress without losing quality" is a slightly contradictory request, because most PDF compression works by throwing information away. But the phrase points at something real: in a typical oversized PDF, the bulk of the file is one specific kind of data, and a large amount of it can be removed before anyone notices a difference.

The trick is knowing what is actually taking up the space. Once you know that, you can pick a method that targets it instead of degrading the whole document evenly.

What actually makes a PDF large

A PDF is a container. The text in it is usually stored as vector instructions — draw this glyph, from this font, at this position — which is remarkably compact. A hundred pages of pure text is often under a megabyte.

So when a PDF is 40 MB, the text is almost never the reason. The usual causes are:

  • Scanned pages. A scan is not text — it is a photograph of text. Every page is a full-resolution image, often at 300 DPI or higher.
  • Embedded photographs saved at print resolution when the document will only ever be read on screen.
  • Fully embedded font files. Embedding an entire font family rather than just the characters used can add megabytes.
  • Retained editing history and metadata from the program that produced the file.
  • Duplicated images — the same logo embedded separately on every page instead of once and referenced.

The first two account for the overwhelming majority of oversized PDFs in practice.

Lossless methods: try these first

Some reductions cost nothing in quality at all. They are worth attempting before you touch any image quality slider.

Font subsetting keeps only the glyphs the document actually uses. A font file containing thousands of characters is replaced by one containing the eighty or so that appear in your text. The document renders identically.

Stream compression applies standard lossless compression to the PDF's internal data streams. Most modern PDF writers already do this, but files exported from older software often have not been compressed at all.

Removing redundancy — deduplicating repeated images, dropping orphaned objects left behind by editing, and stripping metadata such as thumbnails and editing history — reclaims space with no visual change whatsoever.

If your PDF is text-heavy and large, these methods alone may solve the problem entirely. If it is scan-heavy, they will barely move the number, and you need the next section.

Lossy methods: where the real savings are

For image-heavy documents, reducing the images is the only thing that meaningfully shrinks the file. There are two levers, and they are different.

The first is resolution. A page scanned at 600 DPI contains four times the pixel data of the same page at 300 DPI. If the document is destined for a screen, even 150 DPI is often indistinguishable in normal reading. Downsampling is the single most effective change you can make to a scanned document.

The second is JPEG quality. Re-encoding embedded images at a lower quality setting discards fine detail the eye is poor at noticing. Between quality 90 and quality 60 the file often halves while most people cannot tell the difference on a photograph. Below about 50, artefacts start becoming visible around sharp edges — which includes the edges of scanned letterforms, so text-bearing scans tolerate compression less well than photographs do.

The trade-off worth understanding

Some compression tools, including the one on this site, work by rasterising each page — rendering it to an image and rebuilding the document from those images.

This is very effective at shrinking a file, and for a document that was scanned in the first place it costs almost nothing, because those pages were already images.

But applied to a document with real text, it is a genuine loss beyond visual quality: the text stops being text. You can no longer select it, copy it, or search it, and a screen reader can no longer read it. The page looks similar and behaves entirely differently.

That is why it is worth checking what kind of PDF you have before compressing. Try selecting a line of text in your PDF reader. If the text highlights, your document has a real text layer and you should be careful about anything that rasterises it. If nothing highlights, the page is already an image and rasterised compression costs you nothing you had.

A practical order of operations

For most documents, work through it like this:

  • Check whether the text is selectable. This determines everything that follows.
  • If the file is text-based and large, look for embedded images first — a single uncompressed photograph is often the entire problem.
  • If the file is scan-based, downsample the resolution to match how the document will be read. Screen reading rarely needs more than 150 DPI.
  • Apply JPEG re-encoding at around quality 60 to 75 and compare the result against the original before accepting it.
  • Check the output size. If the saving is small, the file was probably not image-heavy, and compression is not the right tool — splitting the document may serve you better.

Always compare before and after. A compression tool that does not show you both numbers is asking you to take its word for it.

When compression is the wrong answer

If you are hitting an email attachment limit, splitting the document into parts is often better than degrading all of it. A 30 MB report sent as three 10 MB sections arrives intact; the same report crushed to 8 MB may be unreadable.

If the document needs to be printed, resist downsampling. Print needs the resolution that screen reading does not, and a file that looks fine on a monitor can look obviously soft on paper.

And if the PDF is large because it contains a hundred high-resolution photographs, consider whether it needed to be a PDF at all. A folder of images, or a link to them, may serve the recipient better than a single enormous document.

A note on privacy

Most free online PDF compressors work by uploading your document to a server, processing it there, and sending the result back. For a holiday photo album that is unremarkable. For a signed contract, a medical record, a tax return, or anything covered by a confidentiality obligation, it means handing a copy of that document to a third party whose retention policy you have not read.

If you handle documents like that, either use software that runs on your own machine, or use a browser-based tool that does the work locally. You can verify the difference yourself: load the page, disconnect from the internet, and try to use the tool. If it still works, nothing is being uploaded.

Tools mentioned here

All free, all run in your browser, none of them upload your files.