PDF Compressor
Shrink a PDF right in your browser — it never leaves your device. Works best on scanned and image-heavy PDFs, with real before/after sizes.
Result
Drop or choose a PDF on the left and its compressed size shows up here — the exact before → after bytes, how much you saved, and a live download.
Your PDF is processed entirely in your browser and never uploaded. Rendering and rebuilding happen in memory on your own device — no server call, no logging, no analytics on this tool. Disconnect from the internet and it still works.
What actually makes a PDF smaller
A PDF's size is dominated by whatever it embeds. Broadly there are three kinds of weight: images (scans, photos, screenshots), fonts (usually a few hundred KB, often subsettable), and vector text and graphics (already extremely compact). In almost every bloated PDF, images are 90%+ of the bytes. That single fact decides which compression approach can help. Real, meaningful size reduction inside a browser has one honest route, and this tool takes it: rasterise and re-embed. Each page is drawn with Mozilla's PDF.js onto a canvas at the resolution you choose, encoded to a JPEG at the quality you choose with canvas.toDataURL('image/jpeg', q), and pdf-lib stitches those JPEGs into a fresh PDF at each page's original dimensions. Both libraries are pinned and served from this page — no third-party scripts, fonts, or network calls.
Worked example: a 4 MB scanned contract
Say you scanned a 10-page contract on an office copier at 300 dpi and it saved as a 4.0 MB PDF — roughly 400 KB per page, each page a lightly-compressed full-colour image. Run it here at 150 dpi, quality 0.70 and two things shrink the file at once. First, dropping from 300 to 150 dpi cuts the pixel count to a quarter (half the width × half the height). Second, JPEG at 0.70 discards high-frequency detail the eye barely registers on text. The result typically lands around 0.9–1.4 MB — a 65–78% reduction — and still reads cleanly on screen. Push to 72 dpi / 0.55 and the same file can drop under 500 KB, though small print starts to soften. The before → after byte badge above shows your file's actual numbers, not an estimate.
Lossy vs lossless: what this tool is
Compression comes in two families, and it matters which one you are using:
| Lossless | Lossy (this tool) | |
|---|---|---|
| What it does | Repacks bytes; pixels identical | Discards detail; pixels approximate |
| Typical saving on a scan | 5–20% | 50–80% |
| Text stays selectable | Yes | No — pages become images |
| Reversible | Yes | No |
| Good for | Text PDFs, archival | Scans, photo-heavy PDFs |
Desktop tools and print shops often do lossless font-subsetting and stream deflation, which is safe but modest. This tool is deliberately lossy — that is the only way to get a scan down by two-thirds in a browser, and the trade is real.
Why it shines on scans and hurts text PDFs
A scanned document is already a stack of images, often stored with light or no compression, so re-encoding those pages as tuned JPEGs is pure win. A clean, born-digital text PDF is the opposite: it stores letters as vector glyphs that are already tiny, so turning each page into a full-page photograph usually makes the file larger and always makes the text blurrier. This tool never hides that — it shows the real before/after bytes and, if a file grew, says so and tells you to keep the original. Alongside size, rasterising has a genuine cost: text stops being selectable and searchable, and screen readers can no longer read it. Do not rasterise a document where selectable text or accessibility matters.
Choosing quality and resolution
Two dials control the result and both re-run instantly. JPEG quality (0.30–0.95) trades sharpness for size; 0.60–0.75 is a good balance for reading. Resolution sets pixels per inch before encoding: 72 dpi is smallest and fine for quick on-screen reading, 150 dpi (the default) reads cleanly on most screens, and 200 dpi preserves fine print at a larger size. Because everything runs locally you can slide both, watch the percentage update in a second or two, and download when you like the numbers.
Common mistakes
- Compressing a text PDF and expecting it to shrink. A crisp 200 KB report can balloon to 2 MB of page-images. Keep the original; this tool is for scans and photo-heavy files.
- Rasterising a document you need to search or copy from. Contracts, invoices and code lose selectable text permanently.
- Cranking dpi to 300 to "keep quality". That quadruples pixels versus 150 and can erase most of the saving — match dpi to how the file will be viewed, not the scanner's setting.
- Using it to hit a strict upload limit on a tiny file. If a PDF is already well under a megabyte and mostly text, there is little image weight to remove.
Honest limits and privacy
Because it works through the browser canvas, this tool can only re-encode pages as raster JPEGs — it cannot losslessly re-subset fonts, strip unused objects, or recompress an embedded image in place the way a native library like Ghostscript can. It also loads every page into memory, so a very large PDF (hundreds of high-res pages) can be slow or strain a phone's RAM. What you gain is total privacy: the file you choose is read with the browser's local FileReader, processed in memory, and handed back as a download. It is never sent anywhere — no account, no cookie, no telemetry, and it keeps working with your network disconnected.