🗜️ Compress PDF
Shrink a PDF to an exact target size, and be told first whether it is a scan (safe) or real text (you lose the text layer). Runs in your browser.
Choose a PDF, or drop it here
Compressed in this tab. The document is never uploaded.
What Compress PDF Does
There is no general-purpose way to make a PDF smaller without giving something up. A PDF is already a compressed container — its text is vector drawing instructions, which are extremely compact, and its images are usually JPEG or JBIG2 already. Re-saving it recovers almost nothing. So every tool that reaches a chosen file size does it the same way: by rendering the pages to bitmaps and re-encoding them, which throws away detail and, more importantly, throws away the text.
That is worth stating because the category does not. One of the pages ranking on this term advertises both an exact target size and "lossless quality" at the same time, which cannot both be true. Squeezing a four-megabyte scan into 200 KB discards an enormous amount of information; the question is only whether the information mattered.
And that depends entirely on the document, which is why this tool looks before it acts. pdf.js can read a PDF’s text layer, so the pages are sampled and the extractable characters counted before anything is compressed. A scan has almost none — it is already pictures, so re-compressing costs you nothing you had, and the reduction is dramatic. A born-digital report has thousands, and rendering it to images destroys selection, search, copy and screen-reader access permanently.
The size search then works the way the image compressor’s does: encode, measure the real byte count, adjust. Quality is searched first because re-encoding an already-rendered page is cheap; resolution comes down only when quality alone cannot reach the target. Everything happens in your browser, which for payslips, bank statements and application documents is the point.
How to Use Compress PDF
- Add a PDF, or drop it onto the box
- Read the notice telling you whether it is a scan or a text document
- Choose a target size in KB, or pick a rendering resolution
- Turn on greyscale for a black-and-white scan, then compress and save
Formula Used by Compress PDF
What rendering resolution costs in pixels
pixels per page = (widthPt × dpi ÷ 72) × (heightPt × dpi ÷ 72)
- widthPt, heightPt
- the page size in PDF points, 72 to the inch
- dpi
- the rendering resolution chosen
Worked example
A US Letter page (612 × 792 pt) at three resolutions.
- 96 DPI: 816 × 1056 = 0.86 megapixels
- 150 DPI: 1275 × 1650 = 2.10 megapixels
- 200 DPI: 1700 × 2200 = 3.74 megapixels
Result: Going from 96 to 200 DPI is 4.3× the pixels, and roughly that multiple in bytes at the same JPEG quality. Resolution is the coarse control; quality is the fine one.
What kind of PDF do you have?
The tool answers this for you by reading the text layer. It decides whether compressing here is harmless or destructive.
| Type | How to recognise it | Compressing this way |
|---|---|---|
| Scan or photographed document | Almost no selectable text; pages are images already | Safe, and where the big reductions come from |
| Born-digital text document | Thousands of characters of selectable text | Destructive — the text becomes a picture of text |
| Mixed | Some pages selectable, some not | The text pages lose their text layer |
| Already-optimised PDF | Small for its page count, mostly vector | Often comes out LARGER; nothing to win |
Choosing a resolution
| DPI | US Letter page | Good for |
|---|---|---|
| 96 | 816 × 1056 | On-screen reading, email, meeting a tight size limit |
| 150 | 1275 × 1650 | The usual balance — readable, zoomable, much smaller |
| 200 | 1700 × 2200 | Documents that will be printed or read closely |
How to Read Your Result
If it is a text document, compressing is usually the wrong answer
A PDF of vector text that is too large is nearly always too large because of embedded images or fonts, not because of the text. Removing pages you do not need with the splitter keeps everything selectable and often gets you under the limit on its own. Rasterising a contract to save a few hundred kilobytes trades away search, copy and accessibility for the life of the document.
Greyscale is close to free on a black-and-white scan
JPEG stores brightness and colour separately, and a page of black text on white paper carries no colour information worth the bytes. Discarding it typically takes a useful bite out of the file with no visible change. On anything with photographs or coloured charts, leave it alone.
A larger result is a real answer
When the output is bigger than the input, the file was already efficient and this method has nothing to offer it. That is information, not a failure — it means you can stop looking for a compressor and start looking at what is actually big inside the document.
Limitations & Accuracy Notes
- Every page becomes an image. Selectable text, searchability, copy-paste, links and accessibility tagging do not survive. This is inherent to the method, not specific to this implementation.
- Around 200 pages is the practical ceiling: each page is rendered to a bitmap and held while the size search runs, and a browser tab runs out of memory beyond that. Split first.
- Password-protected documents are refused rather than partially processed.
- Bookmarks, form fields, annotations and attachments are not carried into the rebuilt file.
- It cannot re-compress the images inside a PDF while leaving the text as text — that needs a full PDF object rewriter, which is well beyond what a browser tab should attempt.
- A PDF that is already efficient will get larger, not smaller.
Frequently Asked Questions
Does compressing a PDF lose quality?
Why does it check my document before compressing?
How do I compress a PDF to exactly 200 KB?
My PDF got bigger. Why?
Should I use greyscale?
Is my document uploaded?
Is there a page limit?
References & Further Reading
- ISO 32000-1 / PDF 32000 specification (Adobe copy) — Page geometry in points, and how content streams and image XObjects are stored
- pdf.js — Mozilla’s PDF renderer — Used both to render the pages and to read the text layer for the scan-or-text check
- pdf-lib — Rebuilds the compressed document in the browser
- ITU-T T.81 — the JPEG specification — The lossy encoding each rendered page passes through, including the separate chroma channels greyscale discards