Compress PDF
Reduce the size of a PDF locally in your browser: embedded pictures are downsampled and re-encoded, unused objects are removed and the file is rewritten in one compact revision. The original is returned unchanged whenever compression would not help.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Drop a file here, or browse
Accepts: application/pdf
Files stay on your device.
Ctrl+V to paste an image
Options
How hard to push image compression. Light only rebuilds the file.
Drop a file above to begin
Your file are processed on this device and never uploaded.
How it works
Where the size goes
Most of a PDF’s weight is its embedded raster pictures, so compression re-encodes those images and rebuilds the file. The report shows original and compressed sizes, the bytes and percent saved, how many images were re-encoded and left alone, and how many unused objects were removed. Text and vector artwork are rebuilt intact.
The quality presets
Light only rebuilds the file and leaves every picture untouched. Balanced downsamples pictures whose longest side is over 1600 pixels to JPEG at 75 percent quality. Strong pushes harder, downsampling anything over 1100 pixels to 55 percent. Custom sets the longest image side (200 to 6000 pixels) and the JPEG quality yourself, trading visible quality for smaller bytes.
How each image is decided on
Every picture is inspected first: only raster formats the tool can actually re-encode are attempted, and a re-encoded stream is kept only when it is genuinely smaller than the original — an already-tight JPEG, or one that recompresses larger, is left as-is and counted in the skipped column with a reason.
When you get your original back
If compression would not help, you receive the original bytes unchanged with a warning that the PDF is already optimised, and if a structural cleanup changes the document the tool falls back to a straight rebuild. The metadata and output-name options strip document metadata and set the download name. Since pdf-lib cannot re-compress text or vector artwork, nor transcode JPEG 2000, CCITT fax or transparency masks, those parts stay as they are. Everything runs in a Web Worker, so the file never leaves your browser.
Questions
Is my PDF uploaded anywhere?
No. The whole process runs in a Web Worker on your device; the file never leaves your browser.
What if the result is bigger?
You get the original file back untouched and a note saying compression would not have helped.
Why did the size barely change?
pdf-lib can rebuild streams and re-encode raster pictures, but it cannot re-compress text or vector artwork, and it cannot transcode JPEG 2000, CCITT fax or transparency masks.
Related tools
See categoryPDF to Images
Render selected PDF pages as PNG, JPEG, or WebP images.
Merge PDFs
Combine several PDF files into one document, page by page.
Compress Image
Reduce image file size by re-encoding locally in your browser.
Add Page Numbers
Stamp page numbers onto a PDF in the position and format you choose.