What "light" PDF compression means
A PDF carries fonts, vector paths, raster images, and metadata, all packaged in a stream that can be either compressed with deflate or left raw. Many PDFs ship with redundant or uncompressed streams - re-saving them through a library that re-deflates everything produces a smaller file with no visible change in quality.
This tool drops a PDF in, re-saves it through pdf-lib with object streams enabled, and shows you the size before and after. Expect modest savings (5-15% is typical) on documents that are already mostly compressed. The big wins come from PDFs full of uncompressed images or older "Save as PDF" exports from Office and LaTeX.
For deep compression of image-heavy PDFs (scans, brochures with many photos), this is not enough. You would need to re-encode each embedded image at lower quality - a feature that belongs on the server side and is on our roadmap. We label this tool Light compression so the expectation is honest from the start.
How to use it
- Drop a PDF onto the upload area or click to pick one from disk. The file stays in your browser.
- Pick a compression level: Low (safest, smallest savings), Medium (default, balanced), High (most aggressive within pdf-lib limits).
- Press Compress. The library reads every object, re-deflates streams, removes unused entries, and writes a new file.
- See the before vs after comparison: original size, new size, percent saved.
- If the new file is smaller, download it. If it is bigger (rare - happens when the original was already over-optimized), keep the original.
- For deep image compression (scans, photo PDFs), use a desktop tool like Adobe Acrobat's Reduce File Size or Ghostscript with `pdfsettings=/ebook`.
When this is useful
Six everyday reasons to re-compress a PDF:
- Email attachment limits: Gmail caps attachments at 25 MB, corporate mail servers often cap at 10 MB. Even a 5% reduction can push a borderline file under the limit.
- Web hosting and downloads: smaller PDFs load faster and use less bandwidth, especially for users on slow connections.
- Storage and backup: a folder of 100 lightly-compressed PDFs can shed gigabytes that add up across a year of work.
- PDFs from old "Print to PDF" exports: pre-2015 desktop printers often produced bloated PDFs with uncompressed content streams. Re-saving them is essentially free space.
- PDFs from Word or LaTeX: Word's built-in export sometimes leaves redundant resource entries; pdf-lib cleans those up.
- Quick prep before merging: smaller intermediates make a final merged document smaller too.
Companion tools: PDF and image converter, PDF metadata editor, PDF page numbers.