Home/PDF Tools/Compact PDF
🧹

Compact PDF

FREE

Rewrite the file cleanly, dropping leftover objects and edit history

Free · No sign-up required
Loading...

What this tool does — and what it does not

This tool loads a PDF and re-saves it in a clean, compacted form: unused objects left behind by earlier edits are dropped, the file structure is rewritten from scratch, and the object tables are stored in compressed object streams. For PDFs that have been through many rounds of editing, or were produced by generators that write sloppy structure, the result is a smaller, tidier file that opens faster. It does not recompress images, subset fonts or change page content — so a file that is large because of its images will stay large; use Compress PDF for that. And it does not produce a linearized (“fast web view”) file; see below for what that means and how to get one.

Where the savings come from

Source of bloatRemoved?Typical saving
Orphaned objects from deleted pages or editsYesAnything from 0 to 50%+ on heavily edited files
Incremental update sections (old versions appended on each save)YesFiles saved many times in Acrobat can be halved
Uncompressed cross-reference tablesYes — moved into object streamsA few KB to a few hundred KB
Redundant whitespace and verbose object syntaxYesSmall
Large imagesNoUse Compress PDF
Fully embedded fontsNoRe-export with font subsetting

A freshly exported document from Word or a browser usually gains little — it is already clean. A contract that has been signed, annotated and re-saved a dozen times is where this tool shines, because every save appended a new section instead of rewriting the file.

Incremental updates: why edited PDFs grow

When Acrobat and many other editors save changes, they append the modified objects and a new cross-reference table to the end of the file rather than rewriting it. That is fast and preserves signatures, but the old objects stay in place. After ten saves the file can contain ten versions of a page. Re-saving from scratch keeps only the current version of each object — which is exactly what this tool does. It also means the file's edit history is gone, which is often what you want before sharing.

About linearization (fast web view)

A linearized PDF is arranged so the first page's objects come first in the file with a hint table, letting a browser display page one while the rest is still downloading. It matters for large PDFs served over slow connections; for files under a few megabytes on modern connections the difference is negligible. Linearization requires a specialised writer — pdf-lib, the library used here, does not do it. If you need it, run the compacted file through qpdf --linearize, Ghostscript, or Acrobat's “Save As Optimized” with Fast Web View enabled.

Common uses

  • Shrinking a much-edited document before emailing or archiving.
  • Removing the history of previous versions from a file before it leaves the organisation.
  • Repairing files with damaged cross-reference tables that some viewers refuse to open — a clean rewrite often fixes them.
  • Normalising PDFs from many sources into a consistent structure before further processing.

What is preserved

  • All pages, content, fonts, images and vectors, byte-for-byte.
  • Annotations, form fields and links.
  • Document metadata.
  • Not preserved: digital signatures — rewriting the file invalidates them by design, since a signature covers the exact bytes. Keep the signed original.

Frequently asked questions

The file barely shrank. Why?

It was already clean, and its size comes from images or fonts, which this tool does not touch. Try Compress PDF for image-heavy files.

Is the result a 'fast web view' PDF?

No. It is compacted but not linearized. Use qpdf, Ghostscript or Acrobat for linearization if you need it.

Does it change how the pages look?

No. Page content is copied unchanged; only the file structure around it is rewritten.

Can it fix a PDF that won't open?

Sometimes. If the problem is a broken cross-reference table or trailer, a rewrite repairs it. If the page content itself is damaged, it cannot.

Will my digital signature survive?

No. Any rewrite invalidates signatures. Keep the signed original and use the optimized copy for circulation only.

Is my file uploaded?

No. The rewrite is done with pdf-lib in your browser.

More tools in this category

🔗
Merge PDF
Combine several PDF files into one document
Split PDF
Break a PDF into single pages or two halves
📑
Extract PDF Pages
Pull selected pages or ranges into a new PDF
🗑
Delete PDF Pages
Remove specific pages or ranges from a PDF
🗜
Compress PDF
Shrink scanned or image-heavy PDFs by re-rendering pages
🔄
Rotate PDF
Rotate every page by 90°, 180° or 270° losslessly