Compress PDF
Reduce PDF file size in your browser by rebuilding the document. No upload required.
Runs in your browser — files never leave your device
How it works
A PDF is internally a collection of hundreds or thousands of numbered objects — pages, fonts, images, metadata — plus an index that says where each one lives. Files accumulate structural fat over time: many generators write that index as a verbose plain-text table, leave small objects uncompressed, and — most wastefully — save edits by appending to the file, so every revision of an edited object stays in the file forever alongside its replacement.
This tool parses the document with pdf-lib and writes a clean, single-generation copy using object streams: the small bookkeeping objects are packed together into flate-compressed streams, the cross-reference index is written as a compact compressed stream, and only the current version of each object is kept. A typical report that has been through several rounds of annotate-and-save carries every earlier version of its changed objects; the rebuilt file contains just the live ones.
Just as important is what it does not do: images and fonts are copied through byte for byte, never re-encoded or downsampled. That makes the operation lossless — pages render identically, text stays selectable — but it also bounds the savings. A file dominated by scanned page images will barely shrink, because the image bytes are untouched; the win comes on structure-heavy documents, and the before/after readout tells you honestly what happened, including when there was nothing to remove.
Practical notes:
- Useful when a file just misses an attachment limit and you don’t want any quality loss.
- Digital signatures are invalidated by any rewrite — compress before signing, not after.
- Password-protected PDFs can’t be loaded; save an unprotected copy first.
The whole rebuild happens in your browser’s memory. The PDF is never uploaded, so nothing confidential ever leaves your machine.
Frequently asked questions
- What does the compression actually do?
- It parses the PDF and writes a clean new file with a more efficient internal structure: the many small bookkeeping objects are packed into compressed object streams, the cross-reference index becomes a compact compressed stream instead of a plain-text table, and superseded object versions left behind by earlier edits are not carried over. It’s structural housekeeping, not lossy compression.
- Does it recompress or downsample the images inside?
- No. Image and font data are copied through byte for byte — nothing is re-encoded, resized or reduced in quality. That’s what makes the process lossless, and also what limits how much an image-heavy file can shrink.
- How much smaller will my PDF get?
- It depends entirely on how the file was built. PDFs with long edit histories or old-style uncompressed structure can shed a noticeable share of their size, while files from modern, well-behaved exporters often only lose a few percent — and a document that is mostly scanned images will barely move. The before/after readout shows you the real number for your file.
- Why did my file barely shrink?
- Because its bulk is image or font data, which this tool deliberately leaves untouched. In a scanned document, the page photographs are often well over 90% of the bytes, so restructuring the remainder saves little. Shrinking such files further requires downsampling or re-encoding the images, which is a lossy operation this tool doesn’t perform.
- Will the PDF look or behave differently afterwards?
- Pages render identically, because the content that describes them is copied through unchanged — text stays selectable and links keep working. One exception to know about: a digitally signed PDF loses its signature validity, since any rewrite of the file changes the bytes the signature was computed over.
- Can it compress password-protected PDFs?
- No — encrypted files fail to load and you’ll see an error. Open the PDF with its password in a viewer, save an unprotected copy, and compress that instead.
- Is my PDF uploaded to a server?
- No. The file is parsed, rebuilt and re-saved by the pdf-lib library running entirely in your browser — it never leaves your device, and no copy exists anywhere else at any point. That makes it safe to use on contracts, statements and other documents you wouldn’t hand to a random website.
Related tools
- Merge PDFCombine multiple PDFs into one file, right in your browser. Reorder before merging; nothing is uploaded.
- Split PDFSplit a PDF into individual pages or ranges locally and download the parts.
- PDF to ImageConvert PDF pages to PNG images locally using pdf.js. Each page becomes a downloadable image.
- Rotate PDFRotate all or selected PDF pages by 90° in your browser and download the result.
- Reorder & Delete PDF PagesReorder or remove pages from a PDF locally, then download the rebuilt document.
- Extract PDF PagesPull selected pages out of a PDF into a new file, entirely in your browser.