Under the hood
How it works — and where its limits are
A PDF is not one solid block of data. It is a collection of objects — text runs, fonts, images, and the
structure that ties them together — and “compressing” it can mean three very different things. This tool tries
up to three strategies locally and keeps whichever produces the smallest file that is still smaller than your
original. If none of them beats the original, you get the re-saved copy and a note saying so, instead of a
larger file dressed up as a success.
Strategy 1 — rebuild the structure. The file is parsed with the pdf-lib library and saved
again using object streams, a more compact way of packaging the PDF’s internal objects. Nothing about the
visible content changes: text stays text, images keep their original data. This pass removes slack left behind
by editors that saved the file inefficiently, which is why it helps most on files produced by office software
and least on files that were already saved compactly.
Strategy 2 — re-encode the embedded images, keep the text. In most large PDFs, the bulk
of the bytes is not text at all but images: scans, photos, screenshots. This pass finds the embedded raster
images, decodes them, and re-encodes them as JPEG at the quality for the level you picked. A scanned page stored
as a lossless image can shrink dramatically this way, while the text layer — the part you can select, copy and
search — is left exactly as it was. Images stored in formats this pass does not handle are left untouched rather
than risk damaging them.
Strategy 3 — rasterise everything (Extreme only). Each page is rendered by pdf.js at 1.8×
scale and rebuilt as a single JPEG image per page, using the legacy engine’s quality settings. This produces
the smallest files for scan-heavy documents, but the trade-off is fundamental: the result is a picture of your
document. Text cannot be selected or searched, accessibility tools see no text, and enlarging the page reveals
pixels instead of crisp letterforms. That is why this strategy is never used silently — it only runs when you
choose Extreme, and the level picker says so in plain words.
Why a text-only PDF barely shrinks. Plain text is already tiny: a page of characters is a
few kilobytes of glyph references plus a shared font. If a PDF has no images and was saved with object streams,
there is almost nothing left to remove, and any tool promising a big reduction on such a file would have to
rasterise it (Strategy 3) or drop content. Knowing this saves you a round of trial and error: check whether your
file is mostly scans or mostly text first, then pick the level — our Experience articles walk through that
diagnosis in detail.
Limits to know about. Encrypted files must have their password removed in a PDF reader
first. Everything runs in your browser’s memory, so a very large file on a low-memory phone can struggle —
work on a computer for those. And because nothing is uploaded, there is no server copy to recover: keep your
original until you have opened the result and checked its pages and clarity.