PDF Compress
Reduce the file size of a PDF — entirely in your browser. Choose light (lossless metadata strip), medium (re-encode JPEGs at 60%) or aggressive (downsample to 1000 px + 40% quality). See before/after sizes and the savings percentage before downloading. Your file never leaves your device.
How to use
- 1
Upload a PDF
Drag and drop a PDF onto the dropzone. The original file size is shown so you can compare against the compressed result.
- 2
Pick a compression level
Light strips metadata and packs small objects (lossless). Medium re-encodes JPEGs at 60% quality. Aggressive also downsamples images to 1000 px and uses 40% quality.
- 3
Compress
Click Compress PDF — pdf-lib loads the file, strips metadata, optionally re-encodes JPEG images via Canvas, and saves with object streams enabled. A progress bar shows what's happening.
- 4
Compare and download
See the before / after sizes and the savings percentage. If the result is larger than the original (already well-compressed source), we'll tell you honestly. Download only if it helps.
Common use cases
- Shrink a 30 MB scanned contract to under 10 MB so it fits in an email attachment.
- Strip metadata from a PDF before sharing it externally to remove author and producer traces.
- Downsample a print-resolution PDF to web-resolution for online preview.
- Prepare image-heavy PDFs for upload to a size-capped portal (visa application, grant submission, etc.).
Limitations
- Already-compressed streams can't be recompressed. pdf-lib cannot re-compress FlateDecode content streams or vector data. If your PDF is text-only or already uses efficient compression, savings may be 0–5%.
- Only JPEG images are re-encoded.CCITT, JBIG2, JPEG2000 and raw FlateDecode bitmaps are left untouched — pdf-lib's API does not expose their decoded pixels.
- Metadata is irreversibly removed. Title, author, subject, keywords, producer, creator, creation date and modification date are all blanked. The original file on your device is untouched; only the downloaded copy loses this metadata.
- True lossless recompression needs Ghostscript. For 50%+ savings on text-heavy PDFs, a server-side tool like Ghostscript is required. This browser-only tool cannot match that — by design, your file never leaves your device.
- Encrypted or password-protected PDFs cannot be compressed — remove the password first.
- Very large PDFs (>100 MB) may take several seconds to process and use significant memory.