Compress PDF (Smart) — Private, In-Browser

This tool reduces PDF file size directly in your browser—no uploads, no servers. It combines pdf.js for rendering pages, pdf-lib for rebuilding PDFs, and MozJPEG (WASM) for high-quality JPEG compression. Scanned/image-heavy pages are aggressively shrunk, while text/vector pages can pass through crisp.

Why use this PDF compressor?

  • 100% private: Processing happens locally in your browser.
  • Smaller files by default: Sensible, aggressive defaults (quality/DPI) target meaningful size savings.
  • Keeps text crisp: Text/vector pages can skip rasterization for sharp results.
  • MozJPEG (WASM): Industry-grade JPEG optimization compiled to WebAssembly for better shrink on scans.
  • Mobile-friendly UI: Simple uploader, live preview, and a clean progress bar with pass-by-pass status.

Key features

  • Quality & DPI sliders: Tune image compression and render resolution.
  • Target size goal: Choose ~85%, ~70%, ~50%, ~30% of original or “Smallest”. The tool escalates until the target is hit or best size is found.
  • Strategies: Auto (detects image-heavy pages), Raster (force for scans), or Pass-through (metadata only).
  • Formats: JPEG (smaller) or PNG (sharper, larger).
  • Grayscale mode: Remove color to save more.
  • Page ranges: Compress specific pages (e.g., 1-3,7,end).
  • Remove metadata: Strip hidden info to reduce bytes.
  • “Never output larger”: When enabled, the tool returns the original file if compression can’t beat it.
  • Keeps original filename: Downloads use your input name by default.

How it works (under the hood)

  1. Each page is inspected. Image-heavy pages are rasterized to a canvas at your chosen DPI; text/vector pages can pass through unchanged.
  2. Rasterized pages are encoded to JPEG via MozJPEG (or Canvas as a fallback) using your quality/subsampling settings.
  3. The tool rebuilds a new PDF with optimized images and preserves page size and layout.
  4. An escalation ladder tries progressively stronger settings until the target is met or the smallest result is found.

Tips for best results

  • For scans, choose Auto or Raster strategy with JPEG format and lower DPI (90–110) to maximize shrink.
  • Enable Grayscale for black-and-white documents (invoices, receipts) to cut size further.
  • Keep Never output larger on if you want to guarantee a non-increasing output size.
  • Use Pass-through only when you want to keep text/vector pages untouched and just strip metadata.

Browser compatibility

Works on modern Chromium, Firefox, and Safari. WebAssembly must be available for MozJPEG; if it isn’t, the tool falls back to Canvas-based JPEG encoding.

Privacy & security

All processing happens locally in your browser tab. Files never leave your device.

Troubleshooting

  • Output is larger: Lower quality, reduce DPI, switch to JPEG, enable Grayscale, or select a stricter goal.
  • Blurry text: Use Pass-through or Auto (so vector text isn’t rasterized), or increase DPI slightly.
  • Huge pages crash: The tool caps render size to keep memory safe. Lower DPI or compress in parts (page ranges).