← Back

PDF Compress

Optimize document structure to shrink PDF file size

This tool mainly optimizes the document's internal structure, so results vary by file — if the PDF's size mostly comes from embedded high-resolution images (like a scanned document), the effect may be limited; for a typical text-based document, compression is usually more noticeable.

About PDF Compress

Set expectations first: this is not an image-downsampling compressor that turns a 20 MB scan into 2 MB. It does one thing: it loads the PDF with pdf-lib and saves it again using object streams (useObjectStreams), which packs the file's many small internal objects together. That can shave bytes off a loosely structured, text-based PDF from an older generator, and does close to nothing for files whose weight is images. After processing, the page shows original size, new size and the percentage change side by side so you can decide whether the result is worth downloading.

How to use it

  1. Click the dashed box "Click to select a PDF file" and choose one PDF; the box then shows its filename.
  2. Click "Start Compression"; the button reads "Compressing…" while it works.
  3. Read the "Original size" and "Compressed" boxes, and the third box, which says either "Reduced by x%" or "No effective reduction".
  4. If you want it, click "Download compressed file". The filename is always "compressed-result.pdf".

Two small samples I actually ran

Rather than guess, I generated two samples with pdf-lib and re-saved them the same way this tool does. A 30-page text-only PDF (created with object streams switched off) went from 63,283 bytes to 31,639 bytes, roughly half; re-saving that result again changed nothing. A one-page PDF holding a single 600x600 random-noise PNG went from 1,081,646 bytes to 1,081,289 bytes, essentially unchanged. Note the first sample was set up in the most favorable way: many PDFs exported by modern software already use object streams, so your file may gain far less, or nothing. These numbers illustrate the mechanism, not what your file will do.

Supported range and known limitations

  • It does not recompress images or lower their resolution, and it does not strip fonts, metadata or annotations. PDFs made mostly of scans, photos or screenshots will barely shrink.
  • The output can be the same size or larger than the input. The third box then says "No effective reduction", but the download button is still shown; do not use that version.
  • Encrypted or damaged files fail with "Processing failed. Please make sure the file isn't corrupted, or try again."
  • One file at a time, and the download name is fixed, so rename it yourself.
  • The whole file is loaded and re-saved in browser memory; very large files are slow and can freeze the tab.
  • Re-saving rewrites the entire file, so a digitally signed PDF will no longer verify afterwards.

It says "No effective reduction". Is the tool broken?

No. It means the file's structure was already compact, or nearly all its weight is image data, so repacking objects cannot help. Keep your original.

How do I really shrink a scanned PDF?

That needs lower image resolution or heavier image compression, which this tool does not offer. Rescan at a lower DPI, or shrink the images with a dedicated tool and rebuild the PDF.

Will the content or layout change?

Page content is not rewritten; only the file structure is saved again, so it should look the same. Still, flip through the result before sending it out.

It hangs on a big file. What can I do?

Larger files use more memory and the browser may stall. Close other tabs and retry, or split the file with PDF Split first and process the parts.

Privacy and processing

The code contains no upload request. Reading, re-saving and building the download all happen in your browser with pdf-lib; nothing is sent to a server. Opening the page loads only the pdf-lib code shipped with the site; no model is downloaded.