Optimize
Compress a PDF
Make a PDF smaller for email or upload limits. Two methods are offered, and you see the exact size before and after so you can decide whether the result is worth keeping.
Your files never leave this device.
Everything runs in this browser tab — there is no upload step and no server that could receive your document. To check: once this page has loaded, turn off Wi-Fi or switch your browser to offline mode, then use the tool. It still works. More ways to verify
or drop one here
How to use
- Choose the PDF.
- Try Lossless re-save first. It never changes how pages look.
- If that is not enough and the file is mostly scans or photos, switch to Strong, set the resolution and quality, and run it again.
- Compare the sizes. If the result is not smaller, keep your original.
How it works
Lossless mode loads the PDF with pdf-lib and writes it back out using cross-reference and object streams, which pack many small internal objects together and compress them. It removes some overhead, such as unused objects left by earlier edits in files that were incrementally saved, but it does not touch images or fonts.
Strong mode uses pdf.js to draw each page onto a canvas at the resolution you choose, encodes the canvas as a JPEG at your chosen quality, and builds a new PDF in which each page is that one picture at the original page size. Pixel count grows with the square of the DPI, so going from 150 to 100 DPI cuts the pixels per page by more than half.
Worked example
A 30-page scanned contract saved by a photocopier at 300 DPI might be 24 MB. Lossless re-save barely changes it, because almost all of the size is image data. Strong mode at 110 DPI and quality 70 redraws each page with about 13% of the original pixel count ((110 ÷ 300)² ≈ 0.13) and typically produces a file a fraction of the size, still easily readable on screen.
A 30-page report exported from a word processor is mostly text and might be 600 KB. Strong mode would make it bigger and unsearchable; lossless re-save is the right choice, and if it saves nothing, the file was already efficient.
Limitations
- Lossless mode cannot recompress or downsample images, so savings are often small.
- Strong mode makes text non-selectable and unsearchable, removes links, bookmarks, form fields and annotations, and is not suitable for documents that must stay accessible.
- Strong mode renders every page, which takes time and memory for long documents.
- Neither mode removes embedded fonts or subsets them further.
Questions
Why is my compressed file bigger than the original?
Some PDFs are already compact. Re-saving can add a little overhead, and turning text pages into images almost always makes them larger. The tool tells you when this happens so you can keep the original.
Which DPI should I use in strong mode?
About 100–120 DPI is comfortable on screens; 150 DPI is a reasonable minimum if the file will be printed. Below 90 DPI small text becomes hard to read.
Does compression remove a password?
No. Encrypted PDFs are refused, because pdf-lib cannot rewrite them without the protection being removed first.
Is anything uploaded to make compression work?
No. Both modes run entirely in your browser; you can disconnect from the internet after the page loads and compression still works.
Related tools
- Images to PDFTurn photos and scans into a tidy PDF with A4, Letter or image-sized pages, margins and orientation.
- PDF metadataRead and change a PDF's title, author, subject and keywords, or strip the document information entirely.
- Split PDFBreak a PDF into separate files by page ranges, into chunks of N pages, or into single pages.