What This Tool Does
Most oversized PDFs are large for one reason: the photos or scanned pages inside them. This tool
walks a PDF's internal object structure with the open-source pdf-lib library, finds
every image that's stored as JPEG data, decodes it with the browser's native image decoder, and
re-encodes it at a lower quality and (if it's larger than needed) a lower resolution using the
Canvas API. The recompressed bytes replace the original image inside the same PDF — the page
layout, text, fonts, and vector graphics are left untouched — and the result is offered as a
download. Nothing about this process involves a server; the whole pipeline runs in the tab's
JavaScript heap.
Why Client-Side Compression Only Recompresses Images
Desktop and server-side PDF optimizers (Ghostscript's -dPDFSETTINGS presets, Adobe
Acrobat's "Reduce File Size") pull several levers: recompressing images, subsetting embedded fonts
down to only the glyphs actually used, recompressing content streams, and removing duplicate or
unreferenced objects. A browser has no equivalent of Ghostscript's rendering and font-subsetting
engine — building one from scratch is a multi-year undertaking, not a client-side library away.
What a browser does have, natively and for free, is a JPEG decoder and encoder (the same
one behind <img> tags and canvas.toBlob()). That's the lever this
tool pulls: images encoded with the PDF spec's DCTDecode filter — PDF's name for
baseline JPEG compression, defined by ISO 32000 alongside the JPEG standard itself
(ISO/IEC 10918-1, also published as ITU-T Recommendation T.81) — are the one
thing a browser can genuinely re-encode without a server. Text, vector drawings, and non-JPEG
image formats inside the PDF are left exactly as they were.
Where the Size Reduction Actually Comes From
Two independent changes each reduce file size, and in practice the second one is often the bigger contributor:
- Lower JPEG quality: a lower quality setting allows more aggressive quantization of the image's frequency data, discarding detail the eye is least likely to notice. This is the classic size/quality tradeoff every JPEG encoder exposes.
- Lower pixel resolution: a photo scanned or exported at a much higher pixel density than it's ever displayed at is carrying resolution nobody sees. Each compression level here also caps the longest edge of any recompressed image — a 4000px-wide scan capped to 1200px has a quarter of the linear resolution and roughly a sixteenth of the pixel count, which shrinks the compressed byte count by a similar order of magnitude even before quality is touched.
Compression Levels
Actual results depend entirely on the source images — a screenshot-heavy PDF behaves differently from a stack of phone-camera scans — but this is what each level targets:
| Level | JPEG quality | Max image dimension | Best for |
|---|---|---|---|
| Low — best quality | 80% | 3000px | Portfolios, print-quality documents |
| Recommended | 60% | 2000px | Emailing, general sharing |
| High — smallest file | 35% | 1200px | Strict upload size limits, archival scans |
Worked Example
Say a 12-page scanned contract was saved from a phone scanning app at 3468×4624 pixels per page, JPEG quality 92 — a typical "default" export that prioritizes fidelity over size. Each page's image alone runs 2–3 MB, so the PDF lands around 30 MB, too large for a lot of email attachment limits. Running it through Recommended here downsamples each page to fit 2000px on its long edge (about 1500×2000) and re-encodes at 60% quality. Every page now holds roughly a sixteenth of the original pixel count at a noticeably more aggressive quantization, and the 12-page file typically comes out somewhere in the 2–5 MB range — comfortably under most attachment limits, still legible for a signed contract viewed on screen. If it still needs to be smaller, re-running at High pushes the same file further, at a visible but often acceptable cost to sharpness on close inspection.
Step-by-Step
- Add files: drag one or more
.pdffiles onto the drop zone, or click it (or Browse) to open the file picker. - Choose a level: Low, Recommended, or High. Recommended is a reasonable default for most sharing purposes.
- Compress: click Compress PDFs. Each file is processed independently.
- Review: the results list shows each file's original size, new size, percent reduction, and how many images were recompressed.
- Download: click Download next to any result to save it. Files whose images were already small enough may report no reduction — that's expected, not a failure.
Tips
- Try Recommended first. Only step up to High if the file still needs to be smaller — it trades more visible quality for size.
- A PDF that's already mostly text (reports, forms, invoices) usually won't shrink much here — that's normal; there's little or no JPEG image data for the tool to work with.
- Compressing an already-compressed PDF a second time yields diminishing returns and progressively worse image quality — keep an original copy before compressing repeatedly.
- Need to combine files first? Use the PDF Merger before compressing, so the whole bundle gets recompressed together.
- Sending the compressed file somewhere private? Add a password afterward with the PDF Password Protector.
- Keyboard accessible: the drop zone is focusable and responds to Enter/Space, and every queue row has a labeled remove button.
Troubleshooting
"No reduction — this PDF has no recompressible images."
The file has no JPEG-compressed images for this tool to touch — commonly a text-only document, one built from vector graphics, or one whose images use a different encoding (PNG-style Flate compression, for example). There's no client-side lever left to pull for those cases.
"No reduction — the images found were already smaller than this level would produce."
The PDF's images are already compressed tighter than the level you picked would produce, so recompressing would make the file larger, not smaller — the tool leaves those images alone rather than doing that. Try a higher compression level if the file must be smaller.
"This PDF is password-protected."
Remove the password first with the PDF Password Remover, then compress the unlocked copy.
"This file is not a valid PDF or is corrupted."
Try opening the file in a PDF viewer first. A file that won't open there is truncated or corrupted and needs to be re-exported or re-downloaded before it can be compressed.