Compress PDF

Shrink a PDF with an adjustable compression level. Free, no upload. 1 GB max · Up to 1 GB · Processed locally, never sent to a server.

A 40 MB PDF bounced back by the recipient’s mail server. A tender pack that goes over the upload limit of a procurement portal. A product catalogue that stalls on a phone away from Wi-Fi. The culprit is almost always the same one: the images embedded in the document. Compress PDF goes after those images, and only those, for as long as you stay on one of the first three levels.

The tool takes one PDF at a time. It first checks that the file carries the %PDF- signature inside its first kilobyte, then hands the document to Ghostscript, compiled to WebAssembly and hosted by the site itself. Four levels are offered: Maximum for reading on screen, Balanced announced at 150 dpi, High quality announced at 300 dpi for printing, and a Scan mode that rests on completely different machinery.

Two things set this apart from a classic compression service. First, the engine comes down once and for all, roughly 16 MB and then cached, while your document is written into a virtual filesystem internal to the WebAssembly module, under the name /in.pdf, and read back from /out.pdf: not one byte of your file travels over the network. Second, if the result is no lighter than the original, the original is what you get back.

How to use it

  1. Drop the PDF in The first 1,024 bytes are inspected. Without the %PDF- signature the file is turned away by a message that quotes its name back to you.
  2. Pick a compression level The menu offers Maximum (reading on screen), Balanced at 150 dpi, High quality at 300 dpi for print, and Scan, which rasterises the pages and leaves the text unselectable.
  3. Click Run On the first use the Ghostscript engine downloads, which takes a moment depending on your connection. Every time after that it comes out of the cache and processing starts straight away.
  4. Follow the recompression page by page The progress bar repeats the lines Ghostscript writes itself: “Recompressing page 7 / 24” names the page actually being worked on.
  5. Read the note before you download The result shows the gain, both sizes and the engine used, on the pattern “−62 % (12.40 MB → 4.71 MB) · Ghostscript engine, text preserved”.

What the engine rewrites and what it leaves intact

Ghostscript is called with the pdfwrite output device and the -dPDFSETTINGS preset that matches the level you picked. Those presets act on images: they are downsampled to the target resolution, then recompressed. Text, embedded fonts and vector artwork are written back as they were.

The file you get is not your original document made lighter. It is a new file, regenerated end to end and declared as PDF version 1.5, which is what the -dCompatibilityLevel=1.5 parameter sets. On a document that carries links, form fields or a navigation outline, check those elements in the output before you circulate it.

Which level to reach for follows from the same logic:

The Scan level, a different mechanism altogether

The fourth level never touches Ghostscript. It opens the document with PDF.js, draws every page into a canvas at 1.5 times its natural size, encodes that image as JPEG at 62 %, then rebuilds a PDF with jsPDF, keeping the point dimensions and the orientation of each original page.

The price is written into the option label: text becomes an image, so it is neither selectable nor searchable, and a pass through OCR will be needed to get it back. This mode has two legitimate uses. The first is scanned documents that the advanced engine cannot digest. The second is deployments where the assets folder is not reachable: the other three levels then return an error that points explicitly at this fallback.

Documents where compression hits a wall

A PDF locked with a password cannot be recompressed. The engine stops and the tool reports that the PDF could not be recompressed, damaged file or password protected, followed by the exit code Ghostscript returned. Unlock the document in the application that produced it, then start over.

A file that has already been through an optimiser, a document made of nothing but text, or a PDF whose images are already at low resolution have no room left. A guard rail compares the size produced with the size dropped in: if the first is not smaller, your document is handed back untouched, with a note that says so.

When another tool is the better answer

If your PDF is heavy because it runs to three hundred pages and you only need to send four of them, pull those four out with Split PDF: you will land far below anything a compression setting can reach. If the pages are meant to illustrate a slide deck, PDF → JPG delivers them as images directly.

And if the document was put together from several sources, compress after merging. A single pass avoids downsampling the same images twice.

Frequently asked questions

Does the engine download again for every compression?

No. The Ghostscript package, roughly 16 MB, is cached on first use. Only the first compression waits for that download, and the Scan mode does not need it at all.

What is the percentage calculated on?

On the ratio between the size of the file produced and the size of the file you dropped in, rounded to the nearest whole number, with both sizes repeated in brackets. When there is no gain, no percentage appears.

Can I compress a password-protected PDF?

No. The engine cannot decrypt the content and stops on an explicit error. Remove the protection in the software that produced the file, run the compression, then lock it again afterwards.

Can Scan mode make my file bigger?

Yes, on pages of text. Turning a vector page into a JPEG photograph often costs more than the text itself. The guard rail then keeps your starting document instead.

The tool says the engine cannot be found. What now?

That message appears when the assets folder is unreachable, typically on a page opened straight from local files. Choose the Scan level, which does without it.

Does the compressed file overwrite the original on my disk?

No. The result is named after your file followed by -compresse.pdf, and it is only written when you click the download button.

Similar tools

Discover other tools

Categories