Tools / PDF / Compress PDF
Client-side

Compress PDF

Reduce PDF file size in the browser by recompressing embedded images, with JPEG quality and dimension controls for the best savings on image-heavy files.

What it does

  • Adjustable JPEG quality (35 to 95) and max image dimension (800 to 2048 px)
  • Optional metadata stripping (document info, XMP, file ID)
  • Batch compress multiple PDFs, exported as a ZIP
  • Best results on photo-heavy or color-scanned PDFs
  • All processing stays in your browser, no upload

Drop files here or click to browse

PDF file

This tool reduces the size of a PDF by finding the images embedded in it, downscaling the ones larger than the size you pick, and re-encoding them as JPEG at the quality you choose. It then rewrites the file with Flate compression on its internal streams. Everything runs in your browser tab through Rust compiled to WebAssembly, so the document is never uploaded. Because almost all of the weight in a typical oversized PDF comes from photos and color scans, that is where the savings are: an image-heavy file can shrink a lot, while a text-only export from Word or LaTeX will barely change.

How to compress a PDF

  1. Drop one or more PDF files on the tool, or click to select them.
  2. Set the JPEG quality slider (35 to 95, default 75).
  3. Choose a max image dimension: 2048, 1600, 1200 or 800 pixels on the longest side.
  4. Leave Strip metadata on (the default) or switch it off.
  5. Click Compress PDF. The result panel shows the original size, the compressed size and the saving in percent, then you download the file (named yourfile-compressed.pdf).

If you selected several PDFs, each one is compressed with the same settings and you get a single ZIP named compressed-pdfs.zip. Files that fail are listed by name, and the others are still delivered.

Which settings to choose

  • Email attachment or upload portal with a size cap: quality around 60 to 70 and 1200 px. Text in scanned pages stays readable on screen and photos remain clear.
  • Document you may print: quality 80 or more and 2048 px. You keep most of the detail and still remove the waste of 20+ megapixel camera photos.
  • Smallest possible file, screen only: quality 40 to 50 and 800 px. Expect visible JPEG artifacts on fine text inside images.

The two controls act differently. Max dimension only touches images that exceed it: a photo of 4000 × 3000 pixels set to 1600 px becomes 1600 × 1200, while an image already smaller is not enlarged. Quality applies to every image the tool re-encodes. If you want a smaller file, lowering the dimension usually gains more than lowering the quality, because the pixel count drops with the square of the scale.

What the compressor does, and what it cannot do

The engine is built on the lopdf library, which edits the structure of a PDF without rendering it. That keeps text, fonts and vector graphics exactly as they were (still sharp, still selectable and searchable) but it also sets the limits of what can be gained.

  • Re-encodes images only when it helps: if an image is not downscaled and the new JPEG would be larger than the original stream, the original is kept.
  • Leaves transparent images alone: images that carry a soft mask or a mask (logos, cut-out graphics) are skipped to avoid visual damage.
  • Skips formats it cannot decode: JPEG 2000 images and 1-bit black-and-white scans (the CCITT or JBIG2 encodings used by many office scanners) are left untouched. A black-and-white scanned PDF may therefore stay the same size.
  • Does not touch fonts or text: embedded fonts are not subset and text is not re-flowed. A text-only PDF can only gain from stream compression and metadata removal, often a few percent.
  • Converts recompressed images to RGB JPEG: grayscale or CMYK images that get re-encoded become RGB, which is fine for screen use but worth knowing if the file goes to a professional printer.

If the reported saving is close to zero, the file has little image data the tool can work on. That is a property of the document, not a setting you missed.

Metadata stripping

With Strip metadata on, the tool removes the document information dictionary (title, author, subject, keywords, creator application, producer, creation and modification dates), every XMP metadata stream and the file identifier in the trailer. It saves a few kilobytes and removes details such as the author name taken from your system account. To read or edit those fields instead of deleting them, use the PDF metadata editor.

Limits

Each PDF can be up to 75 MB and 1,000 pages. There is no account, no daily quota and no watermark. A large scan on an older phone is slower than on a desktop.

Compared with desktop software

Adobe Acrobat's optimizer and Ghostscript (for example with -dPDFSETTINGS=/ebook) rebuild the whole file, can subset fonts and handle more image encodings, so on some documents they reach smaller sizes. They require an installation or a command line. This tool covers the most common case, a PDF bloated by photos or color scans, with no software to install and without sending the file to a third party. When you are building a PDF from photos yourself, you can also shrink the pictures first with the image compressor and then assemble them with Images to PDF.

Why compress locally

The PDFs people need to shrink are usually the ones they must send somewhere: signed contracts, pay slips, tax returns, medical reports, ID scans for a rental file. Hosted compressors receive the full document on their servers, whatever their deletion policy says. Here the WebAssembly module loads once with the page and the compression runs on your machine. You can confirm it in the Network tab of your browser's developer tools, or by going offline after the page has loaded. Our guide on compressing a PDF without uploading it covers the topic in more depth.

Frequently asked questions

Why did my PDF barely get smaller?
The file probably contains little image data, or its images use an encoding the tool skips (JPEG 2000, 1-bit CCITT or JBIG2 scans, images with transparency). Text, fonts and vector drawings are not reduced. Try a lower max dimension if the file does contain large photos.
Will the text stay selectable and searchable?
Yes. Only image streams are re-encoded. Text, fonts, links and vector graphics are kept as they are.
Does compression reduce quality?
It reduces the quality of the images it re-encodes, since JPEG is lossy. At quality 75 and 1600 px or more the difference is hard to see on screen. Text is not affected.
Can I compress several PDFs at once?
Yes. Select multiple files: each is compressed with the same settings and you download one ZIP. The result panel shows the figures for the first file.
Is there a file size limit?
75 MB and 1,000 pages per PDF. Nothing is uploaded, so the practical limit is the memory of your device.
Can it reach a specific target size, like under 2 MB?
There is no target size setting. Compress, check the size shown in the result panel, and if it is still too large run it again with a lower max dimension or quality.