This compressor tries two completely different strategies on your file and gives you whichever wins. The first is a lossless structural resave: pdf-lib reopens the document and rewrites it with object streams enabled, deduplicating internal objects and packing the file structure more tightly. Nothing is rasterised, so text stays selectable, links stay clickable and vector graphics stay razor sharp.
The second is rasterisation. Every page is rendered to a canvas at a reduced scale and re-encoded as JPEG, then rebuilt into a new PDF. That destroys selectable text but is dramatically effective on scanned documents, which are already just images wrapped in a PDF container.
The two results are compared by size and the smaller one is what you download. If neither manages to beat the original file, the tool tells you the document is already minimal and hands back your untouched original rather than a worse version of it.
Both compression paths run inside your browser. A contract or a scanned passport is processed on your own machine, with no copy landing in a queue on a compression service’s server.
| Level | Render scale | JPEG quality | Best for |
|---|---|---|---|
| Basic | 1.5× | 0.72 | Documents you still need to read closely |
| Medium | 1.15× | 0.58 | The usual choice — email attachments, uploads |
| Strong | 0.85× | 0.42 | Hard size limits, where legibility is enough |
These figures only apply to the rasterising path. The lossless resave ignores the level entirely, since there is no quality to trade — which is why a text-heavy report often compresses by the same amount at Basic and at Strong.
A PDF that is mostly text is already extremely compact: the words are stored as font references and coordinates, a few bytes each. There is very little redundancy left to squeeze, and rasterising such a page usually makes it bigger, because a page of type turns into a large photograph of type. The tool detects this and falls back to the lossless resave, which is why your text document might only lose five percent.
Scanned documents are the opposite case. Each page is a full-resolution photograph, often captured at 300 DPI and stored with generous quality settings. Rasterising at a lower scale and quality routinely cuts those files by seventy to ninety percent with no meaningful loss of legibility.
It depends which path wins. If the lossless resave produces the smaller file — the usual outcome for text-heavy documents — text, links and vector graphics are fully preserved. If rasterising wins, which happens with scans, the pages become images and text is no longer selectable.
Text-based PDFs are already highly compressed; there is little redundancy to remove. Large savings come from documents containing photographs or scanned pages. If nothing at all could be saved, the tool returns your original file untouched rather than a degraded copy.
Medium for almost everything. Choose Basic when the document still has to be read carefully or printed, and Strong only when you are up against a hard upload limit and legibility is all that matters.
Yes, but note that multiple files are combined into one compressed PDF rather than returned separately. To compress files individually, run them one at a time.
Password-protected PDFs cannot be opened by the tool at all and will report an error. Digital signatures do not survive compression, since the file is rewritten — a signed document should be left as it is.
No. Both PDF.js and pdf-lib run as JavaScript in this page, so the entire process happens in your browser and the document never leaves your device.