Skip to main content

Compress a PDF

Nobody compresses a PDF for fun. There is a limit somewhere — 10 MB on an email, 5 MB on an application portal, 2 MB on a form that will not say why it rejected you — and the file is over it. What can actually be done about that depends almost entirely on what is inside the document, so this page gives you two genuinely different methods, tells you which one suits what you dropped, and reports what it really saved rather than a marketing number.

Drop the PDF you want to shrink

Rewrite it losslessly, or re-render its pages to hit a size target. Both run in this browser tab — the document is never uploaded.

Export it small in the first place

Compression is damage control. Moda exports the document at the size you need without a second pass over it.

Try Moda free →

Why one PDF shrinks by 90% and another by 2%

A PDF is a container, and its size is the size of what is in it. A text document — a contract, an invoice, a LaTeX paper — is already close to optimal: its content streams are deflated, its fonts are subset to the characters actually used, and the only slack left is structural. Expect single digits from any tool, and be suspicious of one that promises more. A scan or an image-heavy deck is 99% pixels, and shrinking those pixels shrinks the file by whatever ratio you ask for. This is the single most useful thing to understand about PDF compression, and it is why a tool that offers one button and one promise is either failing on half its inputs or quietly destroying the other half.

The lossless rewrite: what it does and does not touch

The first method rebuilds the document’s structure. The cross-reference table is regenerated, small objects are packed into compressed object streams, and orphaned objects left behind by whatever produced the file are dropped. Nothing is re-encoded: the text is the same text, the fonts are the same fonts, the images are byte-identical, links and selectability survive completely. On a document exported by an old tool, a Word export, or something assembled by a script, this can take a surprising bite. On a document that was already written well it will save nearly nothing, and the tool will say exactly that rather than reporting a 1% improvement as a success. If a run comes back no smaller than what you gave it — a rewrite can add a few bytes — the download button hands you your original file back, unchanged, and says so. A compressor that returns a bigger file has not compressed anything.

Re-rendering: the big saving, and what it costs

The second method renders every page to an image at a chosen resolution and builds a new PDF from those images, at the original page dimensions so it still prints at the right size. This is what actually gets a 40 MB scan under 5 MB. It is also destructive in a specific way that a size number will not warn you about: the pages become pictures. Text stops being text — you cannot select it, search it, or copy it, and neither can anything the file is sent to, including any system that indexes documents. Links stop working. Vector charts become raster charts that pixelate when zoomed. For a scan, none of that was there to lose and the trade is free. For a contract you are about to file, it is the wrong tool, and the page says so on screen rather than in the small print.

The size-target search, and when it gives up

Given a budget, the tool walks down a four-rung quality ladder — 200 DPI, 150, 110, 72 — keeping the best result and stopping as soon as one fits. Four rungs rather than a continuous search because every attempt is a complete re-render of every page, and a search that "converges" by rendering a 200-page document fifteen times is not a search anyone wants running in their browser tab. The ladder stops at 72 DPI deliberately: below that the file is small because it has become unreadable, which is not a trade this tool will make on your behalf. If the budget cannot be met, you get the smallest file it managed and a plain statement that the target was missed — not a file that quietly misses it.

Frequently asked questions

Is my document uploaded to compress it?

No. Both methods run in this browser tab: the rewrite with a PDF library compiled to JavaScript, the re-render with a PDF interpreter compiled to WebAssembly. Nothing crosses the network, which matters because the files people need to squeeze under an upload limit are usually the ones they would least like sitting on a stranger’s disk.

Why did the file get BIGGER?

Almost always because you re-rendered a text document. The original stored letters and a font; the result stores a photograph of letters. A page of type can genuinely be larger as an image than as text. Keep the original and try the lossless rewrite instead — the tool will tell you when this has happened rather than handing you the bigger file as a success.

Can it compress the images inside a PDF without rasterizing the whole page?

Not in a browser. Re-encoding the embedded images in place — finding each image object, decoding it, shrinking it, and putting it back with its colour space, mask and transparency intact — is what desktop tools like Ghostscript do, and doing it wrong produces documents that render differently in different readers. Rather than a half-implementation that silently mangles some files, this page offers the two methods it can do correctly.

Is there a file size or page limit?

100 MB per file and 500 pages, both the limits of holding a document in a browser tab. The re-render also has to hold each rendered page in memory before writing it, so a very long document at high quality is the combination most likely to run out of room — the tool declines by name if a page would need a canvas the browser cannot allocate.

Will compression remove a password or a watermark?

No to both. Password-protected files are refused by name — removing PDF passwords is deliberately outside what these tools do. A watermark is part of the page content, so re-rendering keeps it, just as an image.

Related tools

← All tools