Home 🔄 Image Converter 📦 Image Compressor 🖼️ PDF to Image 🗜️ Compress PDF ✏️ Text Tools 📏 DPI Checker About Contact Privacy Policy Donate
🗜️ PDF Compressor

Compress PDF to Target Size

Reduce any PDF to under 5MB, 2MB, 1MB, 500KB — or set a custom target. Preview the size savings and download instantly. 100% browser-based. Your PDF never leaves your device.

📊 Target file size 🔒 Files never leave device ⚡ Binary-search quality engine
Advertisement
💡 The compressor uses a binary-search quality engine to get as close to your target as possible without re-uploading.
📄

Drop your PDF here

or click to select — PDF files up to 50MB

🔒 100% private. Compression runs entirely in your browser. No file is sent to any server.

How the PDF Compressor Works

A smart binary-search engine finds the optimal quality for your target size

📂

Upload PDF

Select or drag your PDF. The File API reads it as an ArrayBuffer entirely in your browser — no network transfer.

🖼️

Render Pages

Mozilla's pdf.js renders each page onto an HTML5 Canvas. The scale factor is adjusted based on the target size.

🔬

Binary-Search Quality

The engine tests JPEG quality values between 5% and 92%, converging in up to 7 iterations to find the exact quality that hits your target.

📄

Rebuild PDF

pdf-lib assembles the recompressed images into a new PDF. The result is downloaded directly to your device.

Frequently Asked Questions

About compressing PDFs online

The compressor uses a binary-search algorithm over JPEG quality (5%–92%). It renders your PDF pages to canvas and recompresses them at successive quality levels, converging in up to 7 iterations to find the quality that produces a file as close to your target as possible — similar to how a calibration process works.
For moderate targets (1MB+), text is generally clear and readable. For very aggressive targets (under 200KB for multi-page PDFs), a quality warning is shown. The compressor works by rendering pages as images — so text becomes rasterised. The output is always visually reviewable via your PDF viewer before you send it.
If your PDF is already under the target size, the tool returns it unchanged with a notice. No unnecessary compression is applied. This is helpful when you're not sure of the current file size and want to verify or pass the file through for consistency.
No. Everything runs locally in your browser using pdf.js and pdf-lib — two open-source JavaScript libraries. Your PDF is never transmitted over the network. This makes the tool fully private and GDPR-safe for confidential documents.
The tool accepts PDFs up to 50MB. Very large files (30MB+) with many pages may take 1–3 minutes depending on your device's CPU and memory, since each page is rendered then recompressed multiple times during the binary search. A progress bar tracks each step.