iSavePDF
Tutorial10 min read

How to Compress a PDF in Your Browser

How to shrink a PDF without uploading it — what compression actually does, what quality settings cost you, and how to verify nothing left your device.

MAY 13, 2026

Compressing a PDF is one of those tasks that sounds straightforward — "make the file smaller" — but actually involves a stack of decisions about image quality, font subsetting, and metadata stripping. Most online compressors hide all of this behind a single "Compress" button, which is fine until you compress a contract and the signatures look blurry.

This guide walks through what's actually happening when you compress a PDF, the tradeoffs of each compression level, and how to do it entirely in your browser — no upload, no signup, no account creation, and no daily limit. We'll cover what works, what doesn't, and how to verify the file never left your computer.

What PDF compression actually does

A PDF is a container. Inside it, you'll find a mix of:

  • Text and vector graphics — already efficiently encoded; little to gain by compressing
  • Embedded fonts — usually subsetted to only the characters used, but sometimes bloated
  • Raster images — JPEGs of scanned pages, photos, screenshots; the biggest size contributor by far
  • Metadata — XMP tags, embedded thumbnails, modification history, attachments
  • Unused objects — leftover references from edits and merges that never got cleaned up

When you "compress" a PDF, the tool makes choices about each category:

  1. Re-encode images at lower quality or lower resolution. This is where 95% of the size reduction comes from. A 300 DPI scanned page can usually drop to 150 DPI without visible loss at screen viewing distance.
  2. Re-compress existing JPEGs at higher compression ratios.
  3. Drop or downsample embedded thumbnails that PDF readers don't actually need.
  4. Subset embedded fonts more aggressively, or replace them with standard fonts when safe.
  5. Strip metadata — XMP tags, modification history, attachments, JavaScript.
  6. Clean up the cross-reference table and remove unreferenced objects.

The first one — image re-encoding — is the dial that matters. Everything else is rounding.

Note

A PDF that's mostly text will only shrink 5–15% even at aggressive compression — there's not much to remove. A PDF that's mostly scanned images can shrink 60–80%. Set your expectations by what's inside the file.

The three quality levels (and what they cost)

Most compressors offer some version of three presets. Here's what each typically does and what it costs you visually:

Low compression / "High quality"

  • Re-encodes images at JPEG quality ~85
  • Downsamples images above 300 DPI to 300 DPI
  • Strips obvious bloat (thumbnails, unused objects)
  • Typical size reduction: 20–40%
  • Visible quality loss: none for normal viewing

Use this when you need a smaller file but the document will be printed or zoomed in.

Medium compression / "Balanced" / "Ebook"

  • Re-encodes images at JPEG quality ~70
  • Downsamples images to 150 DPI
  • Strips metadata aggressively
  • Subsets fonts where possible
  • Typical size reduction: 40–60%
  • Visible quality loss: minimal at screen viewing distance

This is the right default for most use cases — email attachments, web sharing, document archives.

High compression / "Maximum" / "Screen"

  • Re-encodes images at JPEG quality ~50
  • Downsamples images to 72–96 DPI
  • May convert color images to grayscale
  • Aggressively strips metadata
  • Typical size reduction: 60–85%
  • Visible quality loss: noticeable on zoom, photos may look blocky

Use this only when size really matters — uploading to a system with a strict file-size limit, attaching to an SMS, archiving in bulk.

Warning

Compression is one-way. Once you've compressed an image down to 72 DPI, the original detail is gone — recompressing back up doesn't restore it. Keep your original file if there's any chance you'll need the higher quality later.

Why most "free" compressors upload your file

The dominant online compressors — iLovePDF, Smallpdf, PDF24's online tool, Adobe's compress — all work the same way: upload to a server, compress on the server, download the result. This isn't an oversight. There are real reasons for the architecture:

  • CPU-heavy operations. Image re-encoding is fast on a server with dedicated cores; in a browser tab it can be slower.
  • Library size. Server-side, you have access to mature C++ libraries (Ghostscript, MuPDF, qpdf). In the browser, you're limited to what compiles to JavaScript or WebAssembly.
  • Easier engineering. Server-side processing means consistent behavior across user devices. Client-side means dealing with whatever quirks each browser has.

These are pragmatic engineering tradeoffs — they're not malicious. But they have an unavoidable consequence: your file has to travel to their server. For a free vacation-photo PDF you're compressing for email, that's fine. For a payslip, a tax return, or a signed contract, it's the wrong fit.

How browser-based compression works

The newer category of PDF tools runs compression entirely in JavaScript inside your browser tab. The libraries (pdf-lib for structural operations, custom image re-encoding pipelines, WebAssembly builds of compression libraries) load when you open the page, then operate on your file locally.

iSavePDF's compress tool works this way. The flow:

  1. Open the Compress PDF tool
  2. Drop your PDF onto the upload zone — or click to pick it
  3. Choose a quality preset (typically Low, Medium, High compression)
  4. Click Compress PDF
  5. The compressed file downloads to your machine

No upload happens. The PDF is processed in your browser's memory using your CPU. You can confirm this by opening your browser's developer tools, going to the Network tab, and watching during the compress — no outbound file traffic appears.

Free tool

Compress a PDF in your browser — no upload

Shrink PDF file size without losing quality.

Try Compress PDF

How to verify the compression stayed local

The honest claim of "files never leave your browser" should be testable. Here's the test:

  1. Open the compression tool in a new browser tab
  2. Open developer tools (F12 in most browsers)
  3. Switch to the Network tab
  4. Click Clear to reset the request log
  5. Compress a PDF in the tool
  6. Watch the Network panel

For a true browser-based tool, you'll see resources load when the page first opened (HTML, JavaScript, fonts, the PDF library itself), but no requests carrying your file during the compress operation. The output download is generated locally in your browser, not retrieved from a server.

For comparison, run the same test on iLovePDF or Smallpdf — you'll see a large upload request appear in the Network tab as the file goes to the server. That's the architectural difference, visible right there in your browser.

When browser compression isn't the right fit

To be fair, there are cases where a server-based compressor is better:

  • Very large files (300+ MB). Your browser tab has a memory ceiling, usually 2–4 GB. Compressing a multi-GB PDF in the browser may simply run out of memory.
  • Bulk batch jobs. Compressing 200 files in a row is faster on a server with dedicated CPUs.
  • Maximum compression quality. Mature server-side libraries (Ghostscript especially) can sometimes achieve 5–10% better compression at the same quality than current browser-based libraries.
  • Very old PDFs. PDF 1.0 / 1.1 files (pre-1996) sometimes use encodings that browser libraries don't fully support. Server-side tools have more comprehensive support.

For everyday compression (files under 100 MB, normal modern PDFs, single-file workflow), a browser-based tool is essentially indistinguishable from a server one — except your file doesn't go anywhere.

Tips for getting more compression

If your compression results aren't what you hoped, here are the levers:

Drop the resolution before you start

If you're compressing a scanned PDF, the original scan resolution sets the ceiling. A scan at 600 DPI has a lot of room to compress. A scan that was already saved at 100 DPI doesn't.

If you control the original — re-scan at 200–300 DPI rather than 600 DPI. That single decision shrinks the file more than any post-compression can.

Convert color to grayscale

If the document doesn't need to be color (most scans of text-based documents don't), converting to grayscale can cut size by 40–60%. Most compressors don't do this automatically — you have to enable it explicitly.

Crop empty margins

Scanned documents often have large white borders. Cropping those margins before compressing reduces the area each image has to encode, which compounds with image compression for significant savings.

Flatten layers and annotations

Sticky notes, highlights, form fields, and other annotations are stored as separate layers in the PDF. Flattening them merges everything into the base page and removes the overhead.

Compress, then compress again

Compressing the same PDF twice with different settings sometimes shrinks it further — the second pass cleans up artifacts the first pass introduced. Be careful: aggressive double-compression visibly degrades image quality.

What "compressed" should and shouldn't look like

After compression, your PDF should:

  • ✅ Open normally in any PDF reader
  • ✅ Have selectable text where the original had selectable text
  • ✅ Preserve hyperlinks
  • ✅ Keep page count and order
  • ✅ Look indistinguishable from the original at normal viewing distance

After compression, your PDF should not:

  • ❌ Have a different page count
  • ❌ Lose form fields (unless you explicitly flattened them)
  • ❌ Convert text into images (this is a sign of a broken compressor)
  • ❌ Be visibly blurry at normal zoom

If any of the "should not" items happen, the compression went wrong. Re-run with a lower compression level, or try a different tool.

FAQ

Related articles