PDF Compressor

Compress PDF files client-side. Removes redundant metadata, resamples embedded images via Canvas API. 100% private — files never leave your browser.

📄
Drop PDF here or click to upload
Supports PDF up to 100MB. Processed entirely in your browser — 100% private.

Compression Level

🔵
Low
Best quality, smaller file
~20–35% smaller
🟡
Medium
Balanced quality & size
~40–60% smaller
🔴
High
Smallest file, lower quality
~60–80% smaller

How It Works

  • 1Parse PDF with pdf-lib.js: Reads the PDF binary structure, extracting page count, embedded objects, and metadata.
  • 2Remove metadata: Strips Author, Creator, Producer, Keywords fields that add unnecessary bytes.
  • 3Image resampling via Canvas API: Embedded JPG/PNG images are extracted, drawn onto a hidden canvas at reduced DPI, and re-encoded at lower JPEG quality.
  • 4Re-embed compressed images: The resampled image bytes replace the originals in the PDF structure.
  • 5Save optimized PDF: pdf-lib writes the clean, smaller PDF blob ready for download.
⚠️ Limitation: Client-side PDF compression is most effective on PDFs with many embedded JPEG images. Text-heavy PDFs (born-digital) may see 10–30% reduction from metadata removal. For maximum compression, PDFs with large embedded photos will see 40–80% reduction.