Compress a PDF to any size you choose
Type the exact KB or MB limit your form demands and let the encoder search for the best quality that fits. Unlimited attempts, all local.
- Runs in your browser
- Files are never uploaded
- Free, no account
Type the number the form gave you
Every upload limit is somebody's arbitrary choice: 80 KB, 350 KB, 4 MB, 4.7 MB. Rather than guessing at a preset and re-running, put the exact figure in and let the encoder search for the best quality that fits underneath it.
If your limit happens to be a round one, there are dedicated pages for 100 KB, 200 KB, 300 KB, 500 KB, 1 MB and 2 MB — they run the same engine with the box pre-filled.
The algorithm, in full
Nothing here is hidden, so you can predict what it will do:
- Estimate the container. A PDF needs a catalog, a page tree, a
cross-reference table and an object per page. That is approximated as
1,200 + 260 × pagesbytes and subtracted from your target up front. - Pick a rendering resolution. Automatic mode divides the remaining budget by the page count and maps that to a DPI between 72 and 200. You can override it.
- Render each page once. This is the expensive step, so it happens exactly once per page.
- Work out that page's share. Remaining budget divided by remaining pages. Because it is recomputed each time, a page that finishes under budget donates the difference to the pages after it.
- Binary-search the quality. Encode at the floor (5) to check it can fit at all, then bisect between 5 and 94 eight times, keeping the largest quality whose output is within the share.
- Scale down if the floor is still too big. The page is redrawn at 70 per cent and the search runs again, up to three times.
- Assemble and measure. The achieved size, the average quality and the per-page decisions are all reported.
Why the search matters more than the encoder
Everyone has the same JPEG encoder. What differs is how many times you are allowed to run it. An upload-based compressor pays for CPU and bandwidth per request, so nine encodes per page is a cost it has to justify — which is why those services give you three presets and a shrug. Running on your own hardware inverts the economics completely: the marginal cost of the ninth attempt is a few milliseconds you were not using anyway.
That is the same reason there is no daily quota here. Nothing is counting because there is nothing to count.
Choosing a sensible target
| Situation | Try |
|---|---|
| A form states a limit | That limit exactly — the search always finishes under it |
| Email attachment, no stated limit | 500 KB to 2 MB |
| Attaching to a chat app | Under 8 MB covers Discord's free tier and most others |
| Posting on a slow connection | 1 MB, and consider grayscale |
| Archiving a scan you will read again | Don't use this tool — use the lossless mode in Compress PDF and keep the text layer |
Units, rounding and what "KB" means here
Kilobytes are binary here: 1 KB is 1,024 bytes and 1 MB is 1,048,576 bytes, matching how Windows Explorer, macOS's Get Info panel and almost every upload form report file size. So a 100 KB target means 102,400 bytes, not 100,000.
If a form is unusually pedantic and means decimal kilobytes, aim slightly lower — 97 KB rather than 100 KB — and you are safe either way.
What this tool will not do
- Keep the text layer. Hitting a byte target requires re-rendering pages as images. There is no way around that; anything claiming otherwise is either not hitting the target or not keeping the text.
- Improve a bad scan. Compression cannot add detail. If the source is blurry, the output is a smaller blurry file.
- Go below the structural floor. A few hundred bytes per page is the minimum a valid PDF can occupy, and the result panel says so rather than pretending.
Questions
How does the search actually work?
Each page is rendered once, then the encoder binary-searches JPEG quality between 5 and 94 across up to nine attempts to find the highest setting that still fits that page’s share of the budget. If even the lowest quality is too big, the page is scaled down and the search runs again.
Why can an upload service not do this?
It can, but every attempt costs it a round trip and a CPU slice. Ten encodes per page per document is trivial on your own hardware and expensive on somebody else’s, which is why upload converters offer three vague presets instead.
Is there a smallest possible size?
Yes — a PDF still needs a catalog, a page tree and a cross-reference table, so there is a floor of a few hundred bytes per page before any image data. The tool tells you when it has hit that floor rather than silently missing your target.
Can I aim for a size in MB?
Yes, switch the unit next to the number. Anything from a few kilobytes to hundreds of megabytes is accepted; the search behaves the same way at every scale.
Does the target include the file structure or only the images?
The target is the final file size on disk. The tool estimates the container overhead first, subtracts it, and only then divides what is left between the pages — the formula with your numbers is shown under the result.