How it works
- You add one PDF. It is read into an ArrayBuffer in this browser tab — no upload, no queue, no server-side job to wait behind.
- pdf-lib walks the document's object graph and pulls out the image XObjects, which is where the size in a large PDF almost always lives. Each one is decoded onto a canvas, resampled if it exceeds a sensible print resolution, and re-encoded as JPEG at a quality that trades detail you cannot see at 100% zoom for a large drop in bytes.
- The re-encoded images are written back into the document in place of the originals, so page geometry, text position and vector artwork are untouched. Text is never rasterised — a compressed page still has a selectable, searchable text layer.
- Images repeated across pages — a letterhead on every page of a scanned report — are recognised by hash and re-encoded once rather than once per occurrence, which is why a long document does not take proportionally longer than a short one.
- The rewritten document is serialised and handed to you as a blob URL held only by this tab. The before-and-after figures on the result panel are measured from the real byte lengths, not estimated.
Limitations
Text-only PDFs barely shrink, and this is the question the tool exists to answer honestly. A document exported from a word processor is a few kilobytes of text instructions plus an embedded font subset. There is no image data to re-encode, so there is almost nothing to remove — a 900 KB text PDF may come back at 880 KB. That is not a failure of the tool. If you need that file smaller, the size is in the embedded fonts, and the only real fix is to export it again with font subsetting enabled, or to use standard fonts that do not need embedding at all.
Compression is lossy and it is not reversible. Running the same file through twice compounds the loss: the second pass re-encodes an already-degraded JPEG, and the artefacts around text in a scan get visibly worse. If you need a smaller file than one pass gives you, go back to the original and scan at a lower resolution rather than compressing the compressed copy.
Scanned documents that need to stay legally readable deserve care. Fine print, handwritten annotations and stamps are exactly the content that JPEG artefacts damage first. Check the output at 100% zoom on the page that matters most before you send it, and keep the original.
Questions
Why didn't my PDF compress?
Almost certainly because it has no JPEG imagery in it. Compression here works by re-encoding embedded JPEG streams, and a PDF exported from Word or Google Docs is text plus fonts. Images stored with Flate encoding — common in exports from design software — are left untouched, because their raw samples cannot be safely re-encoded without knowing the colour space and predictor the writer used. If the file is large and text-only, the weight is in embedded font subsets, not in anything this tool can re-encode.
Does the text stay searchable?
Yes. Only image XObjects are touched. The text layer, including an OCR layer under a scan, is copied across unchanged, so search, selection and copy-paste all still work in the output.
How much smaller should I expect?
A phone-scanned document typically lands between a fifth and a third of its original size. A photo-heavy brochure varies widely with how it was exported. A text document may not move at all. The result panel shows the measured before and after, so you can see what you actually got before downloading.
Can I choose the quality level?
Not currently. One quality setting is used, chosen to stay invisible at normal reading zoom on a document scan. If you need fine control over the trade-off, a desktop tool with a preview slider is the right instrument.
Do I need an account?
No. There is no sign-up, no email step and no usage counter. The tool is paid for by the ads on this page.
When people use it
Nearly everyone who opens this page has hit an upload limit. A visa portal takes 2 MB per document and the passport scan is 9 MB. A recruitment system rejects a portfolio over 5 MB. An email to a client bounces on a 25 MB attachment. The specific number varies; the situation does not, and it is always urgent.
The other group is people archiving. A folder of scanned invoices for the year, or a decade of utility bills that has to live on a laptop with a small drive. Here the value is not one file but the aggregate — a set of scans compressed at the point of filing takes a fraction of the space, and because the text layer survives, the archive stays searchable.
If the weight is in the photographs rather than in the document that contains them, compressing them before they go in works better — Compress image does the same lossy re-encode on a JPG or PNG directly.
How it compares
Every large online compressor uploads your file to a server, and for a passport scan or a bank statement that is a genuine cost with no genuine benefit — the work is not hard enough to need a server. What a desktop tool such as Ghostscript or Acrobat does better is control: downsampling targets, per-image quality, and the ability to strip embedded fonts entirely, which is the only thing that will meaningfully shrink a text-only PDF.