Compress PDF
Shrink a PDF to a target size, or compress it while keeping the text selectable. Runs in your browser — the file is never uploaded.
Which mode should you pick?
The two modes shrink a PDF in completely different ways, and the right choice depends on one question: does anyone need to select, search or copy the text afterwards?
| Maximum compression | Preserve selectable text | |
|---|---|---|
| What it does | Renders each page to a canvas and re-encodes it as a JPEG, then assembles a new PDF from those images. | Parses the document and writes a fresh one — unused objects dropped, the rest repacked into object streams. Page content is untouched. |
| Text afterwards | Pixels. Not selectable, not searchable, softer when zoomed. | Unchanged — selectable, searchable, copyable. |
| Typical saving | Large. Scanned and image-heavy documents routinely drop by 80–95%. | Modest and highly variable. A file written once by a careful generator may save nothing at all. |
| Can hit a size target | Yes — quality and page scale are both adjustable, so there is something to search. | No. It shrinks by whatever slack there is to reclaim, which is not a dial. |
| Best for | Scans, photo-heavy decks, anything going to an upload form with a hard limit, read-only copies. | Contracts, invoices, CVs, papers — anything where the words need to stay words. |
Worth being blunt about the second column: structural compression is not magic, and a PDF exported cleanly from a word processor often has nothing to give. That is not a failure — it means the file was already efficient. If you need it smaller anyway and the text can become an image, Maximum compression is the only path.
Compressing to a target size
Upload limits are handed to you, not chosen — 2 MB for an application portal, 500 KB for an email attachment, 200 KB for a form that will not say why it refused your file. A Low/Medium/High preset cannot answer that, because the same preset produces wildly different sizes from different documents.
Give Target file size a budget instead. The pages are rendered once, then re-encoded at different JPEG qualities — halving the search range each round — to find the best-looking version that still fits. If quality alone cannot get under the limit, the pages are re-rendered at a smaller scale and the search runs again. The result reports the quality and page scale it settled on, so you know how hard it had to work, and if the target simply cannot be reached it says that rather than quietly handing back an oversized file.
How Does PDF Compression Work?
Maximum compression uses a canvas-based re-rendering approach. Each page of your PDF is drawn to an HTML canvas at the chosen scale, then exported as a JPEG image at the chosen quality. Those images are assembled into a new PDF using pdf-lib. The result is significantly smaller, especially for scanned documents or PDFs with many high-resolution images.
Preserve selectable text takes the other route: pdf-lib loads the document and writes it out again, discarding objects nothing references any more and packing the rest into object streams, without ever rasterising a page.
Everything runs entirely in your browser — no file is ever uploaded to a server.
Which Compression Level Should I Choose?
Low Compression
Renders pages at full resolution with 85% JPEG quality. Good for documents where visual fidelity matters, such as presentations or design files.
Medium Compression
Renders at 80% scale and 60% JPEG quality. The recommended choice for most use cases — a solid balance between file size and readability.
High Compression
Renders at 60% scale and 30% JPEG quality. Best for reducing file size as much as possible when quality is less important, such as email attachments.
Specifications
- Accepts
- Gives you
- .pdf download
- Where it runs
- Your browser — the file is never uploaded
- Sign-up
- None
- Cost
- Free, with no usage limits
FAQ
Is my PDF uploaded to a server?
No. The entire compression process happens inside your browser using PDF.js and pdf-lib. Your file never leaves your device.
Can I keep the text selectable?
Yes — choose Preserve selectable text. That mode leaves every page exactly as it is and rebuilds the file around it, dropping objects nothing references any more and repacking the rest. Text stays selectable, searchable and copyable. The trade is size: it can only reclaim slack, so a PDF that was written efficiently the first time may barely shrink at all. Maximum compression is the mode that produces dramatic savings, and it does so by turning pages into images.
Can I compress a PDF to a specific size?
Yes, in Maximum compression. Enter a budget — 500 KB, 2 MB — and the tool renders the pages once, then searches JPEG quality for the best result that still fits. If quality alone cannot get there it re-renders the pages smaller and searches again, and the result tells you the quality and page scale it settled on. If the target is unreachable even at the smallest settings it says so rather than handing back an oversized file.
Does this work on text-based PDFs?
It depends which mode you pick. Preserve selectable text is made for them. Maximum compression will shrink them hard but converts the text to pixels, so it stops being selectable and looks softer when zoomed in — fine for a read-only copy, wrong for a contract someone needs to search.
What is the maximum file size I can compress?
There is no hard limit, but very large PDFs (100+ MB) may take longer depending on your device memory and CPU. Most PDFs under 50 MB compress in seconds.
Why is my compressed PDF larger than the original?
This can happen with very small PDFs or PDFs that already use efficient compression internally. The re-rendering overhead from JPEG encoding can sometimes exceed the savings. If Maximum compression makes the file bigger, the PDF was already well optimised and there is nothing left to take.
Can I compress multiple PDFs at once?
Not currently. The tool processes one PDF at a time. You can reload the page or click "Change PDF" to process another file.