Compress PDF
Reduce PDF file size by re-encoding with pdf-lib's object stream compression.
Deep Dive
Reduce the file size of a PDF by re-encoding it using pdf-lib in the browser. Removes redundant objects and optionally recompresses embedded images. The original file is never uploaded — all processing happens locally in your browser tab.
Who uses this?
- Shrinking a large PDF report before emailing it
- Reducing a portfolio PDF to meet an upload size limit
- Compressing scanned document PDFs for archiving
- Preparing a PDF for uploading to a web form with file size restrictions
Common Errors & Fixes
Compressed file is the same size as the original
The PDF may already be well-optimized. Text-heavy PDFs with minimal images have little room for compression.
PDF becomes corrupted after compression
Some PDFs use non-standard structures that pdf-lib cannot safely process. Try with a different PDF or use a desktop tool.
Expert FAQ
How much smaller will the PDF get?
Results vary. PDFs with embedded high-resolution images can shrink significantly. Text-only PDFs may see little reduction since text is already compact.
Will the compressed PDF look different?
At low compression, the visual difference is minimal. At high compression, embedded images may appear softer. Text quality is unaffected.
Is the PDF uploaded to a server?
No. The PDF is processed entirely in your browser using pdf-lib compiled to WebAssembly. Nothing is transmitted.
Does this work with password-protected PDFs?
No. Encrypted or password-protected PDFs cannot be processed without the password.