Compress a PDF to a target size

or drop one here
Compression level
Target size
Choose a PDF file first.

Name the size you need in kilobytes or megabytes. Four methods work toward it in this browser tab: structural cleanup, image downsampling, font subsetting and a raster fallback. Every candidate is opened again and its text compared with the source. A file that loses more than two percent of its characters is thrown away, not offered.

How to compress a PDF to a target size

  1. Choose the PDF

    Press Choose a PDF, or drop the file on the page. The file is read in this tab and is not sent anywhere.

  2. Name the size

    Choose a compression level, a target below the file's current size, or type your own smaller number in KB.

  3. Press Compress

    Four methods race: copy the pages into a fresh file, re-encode the placed images, cut each embedded font down to the glyphs the pages draw, and, only when no other method reached the target, redraw the pages as images with the text kept on top.

  4. Read the check, then download

    Every candidate is opened again and its characters are counted against the source. The page shows the size, the method that won and the characters kept before it offers the download.

The four methods are described in full, with the measurements behind them, in how it works.

What a target size means here

A target is a byte ceiling, not a quality setting. One kilobyte is 1,024 bytes here, so a 200 KB target means 204,800 bytes and the engine stops below that number rather than at it. Type any number smaller than the file already is, or take one of the preset levels.

Some upload forms count a kilobyte as a flat 1,000 bytes, which makes their limit 2.3% tighter than the same number here. When a file that reads as fitting is refused at the other end, set the target a little lower and run it again.

The common ceilings have their own pages with the number already set: 100 KB, 200 KB, 500 KB and 1 MB are the four the public run measures, and each one says what it reached.

How often a target is reached

The reach is measured rather than modelled. A public 120-case run asks for 100, 200, 500 and 1,000 KB across scans, text documents and mixed files. It met the target on 55 of the 120 and no case failed to produce a verified file. The median cut was 59.2%, the 90th percentile 88.1%, the smallest 3.8%, and no output came back larger than its source.

Document kind decides most of the outcome. Scans met their target on 16 of 18 cases, 88.9%, because a page image answers to image quality and nothing else. Text documents met theirs on 10 of 50, 20.0%, because their bytes are fonts and structure and there is far less to give back. Mixed documents sit between the two, at 29 of 52.

Time follows the document, not the target. Over the same run in Chromium the median case took 2.5 seconds and the slowest 9.1 seconds. Everything is read and written in this tab, so nothing waits behind other people's work in a queue.

When the file stops short of the target

No candidate ships without being read back. When none of the four methods reaches the number you asked for, the page hands back the smallest file that passed verification and says how far over the target it landed. It also names the method that won, so you can see whether images, fonts or document structure was the limit.

Three things are worth trying, in order. Size breakdown names the images, fonts and streams carrying the weight, which usually points at one or two pages. Delete PDF pages and Split PDF remove or divide what does not have to be sent. If the cap is a guideline rather than a hard limit, a larger target keeps more detail.

How to compress a PDF covers which of the four methods does the work on which kind of document, and Compress a PDF without losing quality covers what can be reduced with no visible change to the page.

Questions

Is my PDF uploaded to a server?
No. The compression runs in this browser tab. No part of the file is sent anywhere, no account is needed and nothing asks you to sign in.
Does the text stay selectable?
Yes. Every candidate file is opened again with pdf.js and its non-space characters are counted against the source. A candidate that keeps less than 98% is refused and a different one ships. In a public 120-case test run, all 102 documents that carried text kept 100% of their characters.
How small can a PDF get?
It depends on the document. Over 120 public cases at 100, 200, 500 and 1,000 KB targets, 55 met the target, the median cut was 59.2%, and no output was larger than its source.
What happens if it cannot reach the size I asked for?
It gives you the smallest file it proved and says how far over the target that file is. It then offers one more step, redrawing the pages at a lower resolution, and states what that costs before you press. You can put the two files side by side at true size before you decide.
How long does it take?
Over the same public run in Chromium, the median case took 2.5 seconds and the slowest 9.1 seconds. A large scan takes longer than a text document.
Which files does it work on?
Any PDF your browser can open, including scans. A scan carries no text to count, so there the picture comparison is the evidence instead. The title and the author of the source are carried into the output.

The other pdfpix tools

All 30 of them run in a browser tab like this one. Each reads its own output back and checks it before offering the download, and none of them needs an account.

Where to go next