Skip to content
Processing locally — files never leave your device

Compress PDF Online

Reduce PDF size by recompressing images embedded in the document. Choose your quality target, see the size before and after.

How to use PDF Compress

  1. Select the oversized PDF you want to shrink; pdf.js opens it locally and reports its current size.
  2. Pick a target DPI. 150 is the sweet spot for on-screen reading; drop to 100 or 72 for the smallest files.
  3. Set the JPEG quality slider. Lower quality means a smaller file but more visible artefacts on photos.
  4. Click "Compress". Each page is rendered to a canvas at the chosen DPI and re-encoded as a JPEG image.
  5. The smaller PDF downloads automatically, and the tool shows you exactly how many bytes (and what percentage) you saved.

How to compress a PDF in your browser

Large PDFs are a daily nuisance: email servers bounce attachments over 10 MB, web forms reject oversized uploads, and cloud storage fills up fast. This compressor shrinks a PDF by re-rendering each page at a lower resolution and re-encoding it as a JPEG, then assembling the results into a new, lighter document — all without sending your file anywhere.

How the compression works

Every page is drawn onto an off-screen canvas at the DPI (dots per inch) you select. The canvas is then exported as a JPEG at your chosen quality level, and pdf-lib stitches those images into a fresh PDF. Two settings control the final size: DPI governs how many pixels each page contains, and JPEG quality governs how aggressively each pixel is compressed. Lowering either one reduces the file size; lowering both produces the smallest result.

When this tool is the right choice

This rasterizing approach excels on scanned documents, image-heavy brochures, presentations exported to PDF, and anything where the visual layout matters more than selectable text. It is the most dependable way to force a stubborn, oversized scan down to an emailable size. It isnotthe right tool for text-only reports where you need to keep the text searchable — for those, your word processor's native PDF export usually produces a smaller file already.

Choosing DPI and quality for shrinking

For compression these two dials work together, and the goal is the lowest pair that still reads cleanly:

  • 72–100 DPI, 50–70% quality: the most aggressive setting — turns a bloated email attachment into something that sails under a 5 MB limit.
  • 150 DPI, 70–80% quality: the everyday sweet spot, indistinguishable from the original on any screen.
  • 200–300 DPI, 85–95% quality: reserve for documents headed to a printer, where the extra resolution actually shows.

A worked example: a 28 MB colour brochure scan at its native resolution typically lands around 2–3 MB at 100 DPI / 60% quality — roughly a 90% reduction with no visible loss on screen. The tool reports the exact bytes saved after each run, so if the result still feels heavy, step the DPI down one notch and compress again.

Where this shrinks files and where it cannot

Because compression here means re-photographing each page at a lower resolution, the savings are proportional to how much of the page was an image in the first place. A scanned contract or a photo-rich report can shed 80–95% of its weight; a born-digital page that is mostly Helvetica text was already tiny and may even grow slightly when a crisp text page is re-encoded as a JPEG. If the savings disappoint, the file was probably already efficient — that is a sign to stop, not to push the quality lower.

What you trade away

Rasterizing is a one-way door: the output PDF is a stack of flattened images, so highlightable text becomes pixels, Ctrl+F search stops finding anything, hyperlinks go dead, and form fields can no longer be filled. None of that touches your original on disk — only the downloaded copy is flattened — but it is the reason you should treat this as the last step in a workflow, after any merging, page deletion or rotation is already done.

Related PDF tools

  • PDF to JPG — if you only need the pages as standalone images rather than a lighter PDF.
  • Split PDF — break a memory-busting scan into parts you can compress one at a time.
  • Merge PDF — reassemble those compressed parts into a single file.
  • Image Compressor — shrink the source photos before you ever build the PDF.

Frequently asked questions

How does this compressor actually shrink the file?
It rasterizes every page at the resolution you choose, JPEG-compresses the result, and rebuilds a brand-new PDF from those flattened images. This is the most reliable way to shrink image-heavy or scanned PDFs without server-side tooling. The trade-off is that text becomes part of the page image, so it is no longer selectable or searchable.
Will text stay selectable and searchable?
No. Rasterizing flattens each page into a single image, so highlight-to-copy and Ctrl+F text search stop working. If keeping live text matters, this is the wrong tool — instead use your source application's "Save as reduced-size PDF" option, or a desktop tool that does lossless object-stream compression.
What DPI should I choose?
150 DPI looks visually identical to the original for almost everyone reading on a screen and is the recommended default. 72–100 DPI produces the smallest files and is fine for email attachments and archives. Choose 200–300 DPI only if the result will be printed, since print needs the extra resolution.
Why did my file barely shrink — or even get bigger?
PDFs that are already mostly text, or already use efficient image compression, have little to gain from re-rasterizing. In some cases a crisp text page re-encoded as a high-quality JPEG can actually grow. If you see little or negative savings, lower the DPI and quality, or accept that the file is already well-optimized.
Does compressing reduce quality permanently?
Yes — JPEG compression is lossy, so detail removed cannot be recovered from the output file. Always keep your original PDF. Because this tool never touches the file on your disk, your source document stays intact; only the downloaded copy is compressed.
Is there a file-size or page limit?
No fixed cap, but rasterizing is the most memory-hungry PDF operation here — every page is held as a full-resolution bitmap before it is re-encoded. A few hundred high-DPI pages can exhaust the tab, especially on a phone. If a big scan stalls, drop the DPI first; if that is not enough, split the document, compress each part, and merge the results.
Are my files uploaded anywhere?
No. The render-to-canvas-then-re-encode pipeline runs through pdf.js, the HTML canvas, and pdf-lib without a single network request — the scan you are shrinking, however sensitive, is processed in the same tab you are reading this in.

More tools you might find useful in the same flow.

Built by Muhammad Tahir · About