Compress PDF
Make a PDF smaller, and never larger.
This tool runs entirely in your browser. Your file is never uploaded, and you can verify that in your browser's network tab. Verify it yourself: open your browser's network tab and watch. You will see one small request asking whether you have tasks left - a tool name and a hash, never the file.
What this does
Two different things make a PDF smaller, and this tool does both in turn. The structural pass repacks the file's objects and recompresses its streams, which is lossless and usually saves 10 to 25 per cent on a document nobody has optimised before. The image pass re-encodes the pictures at a lower resolution, which is where the large reductions on a scan come from, and it is lossy. Both results are measured against the original, and if neither won you get your own file back rather than a slightly bigger one labelled compressed.
The trigger is almost always a limit somewhere else: a mail server that bounces attachments over 25 MB, an application portal that stops at 2 MB, or a 40 MB scanned contract that has to reach someone on a phone connection.
How it works
- Drop the PDF onto this page. Files up to 300 MB are accepted.
- Pick a level. Light is structure only and changes nothing you can see; Balanced re-encodes images at 150 dpi; Strong drops to 100 dpi for getting a scan under an attachment limit.
- Choose Custom to set the numbers yourself - resolution between 72 and 300 dpi, quality between 30 and 95 per cent.
- Open advanced options if you also want the images turned grey, the metadata stripped, or a filled form flattened first. Each makes the file smaller.
- Press Compress. The result reports the size before and after, and how many pages were re-encoded.
The structural pass is qpdf rewriting the file with object streams, compressed cross-references and every flate stream recompressed at level 9. Nothing about the page content changes, so it always runs whatever level you picked. On a file that has already been through a good optimiser it saves nothing at all, which is a real outcome rather than a failure.
The image pass works by re-rendering. A browser cannot reach inside a PDF and re-encode the pictures in place, so every page is drawn at the resolution you chose and written back as a JPEG. That would normally cost you the text, so the text is read out with PDF.js first and drawn back over the images in an invisible layer, keeping words selectable and searchable. What this route cannot carry across is links, form fields and annotations - if you need those, use Light.
The rule this tool will not break is that it never hands back a bigger file. An already-optimised document, and one whose images are stored more efficiently than a fresh JPEG of the same page, both genuinely come out larger. When that happens the original bytes are returned untouched and the result says the file was already optimised, because a compressor that grows your file and reports success is worse than no compressor.
Knowing where the size sits will save you a disappointment. In a scan it is the images, so Strong can take 40 MB to under 5 MB. In a text report it is the embedded fonts and the structure, so 10 to 20 per cent is a good result and re-encoding its few images changes very little.
Everything runs on your device. qpdf and PDF.js are compiled to WebAssembly and run in Web Workers, so a 300 MB scan is processed without a byte being sent anywhere.
What this tool cannot do
- Anything above Light re-encodes the images, which is lossy - fine print in a scan softens, and the loss cannot be undone from the output file.
- A document that has already been optimised may not shrink at all. In that case the original is returned unchanged and the result says so.
- When the image pass wins, the pages are rebuilt from pictures, so links, form fields and annotations are not carried over. The text layer is, invisibly.
Questions people ask
- How much smaller will my file get?
- It depends on what is inside. A scanned document is images, so Balanced often takes it to a quarter of its size and Strong to under a tenth. A text document is fonts and structure, where the lossless pass gives 10 to 25 per cent and there is little else to win. The result shows both numbers so you can decide whether to try a stronger level.
- Will the document still look right?
- At Light it is identical to look at, because only the file structure changes. At Balanced, images are re-encoded at 150 dpi, which reads perfectly on screen and prints acceptably. At Strong, 100 dpi is visible on close inspection of a scan and still fine for reading. Check a page of the result before deleting the original.
- Why did my file not get any smaller?
- Because it was already optimised. Files exported by a modern producer, or run through a compressor before, have nothing left to pack. Rather than returning a marginally larger file with a success message, the tool gives you the original back and says so.
- Does compressing make the text unsearchable?
- No. When the image pass runs, the text is extracted before the pages are replaced and drawn back invisibly over the images, so you can still select, search and copy it. What is lost on that path is links, form fields and annotations, which is why Light exists.
- Is my file uploaded to be compressed?
- No. The compression happens inside your browser, with qpdf and PDF.js running as WebAssembly in Web Workers. Open your developer tools, switch to the network tab and compress something: the one request you will see asks whether you have tasks left, and it carries a tool name and a hash of the bytes rather than the file.
- What level should I use to get under an email limit?
- Start with Balanced and look at the reported size. If it is still over, try Strong, and if that is not enough turn on grayscale images in advanced options, which typically removes another third from a colour scan.