PDF Compressor

Share:

Shrink a PDF — quick lossless mode preserves text, aggressive mode flattens pages to JPEG for the biggest reduction. 100% in your browser.

RT-IMG-019 · Image & File

PDF Compressor

No PDF loaded yet.
💡 Try Quick first. If the saving isn't enough, switch to Aggressive — but accept that text becomes part of the image (no copy-paste, no search). Use Aggressive for "share via email / WhatsApp" workflows; use Quick for "keep the document editable."
Drop a PDF to begin.
🔒 PDFs stay on your device. All compression happens in your browser using self-hosted pdf-lib (and pdf.js for the aggressive mode's page-render step). Nothing is uploaded — verify in DevTools → Network.
Advertisement
After results · AD-W1 Responsive · Post-tool — peak engagement

How to compress a PDF

Add your PDF

Drag your file onto the dropzone or click to choose. The tool shows the current file name, page count, and size so you can confirm before compressing.

Pick a mode

Quick (lossless) is the safe default — pdf-lib re-saves the PDF, stripping duplicate fonts, unused objects, and metadata bloat. The text remains selectable and the file's pages, images, hyperlinks, and form fields are intact.

Aggressive (destructive) flattens every page to a JPEG. File size drops dramatically (often 70-90% on image-heavy PDFs) but the text becomes part of the image — copy + paste and text search no longer work on the output.

Tune aggressive mode if used

DPI controls the resolution of the flattened image: 96 DPI for screen-only viewing, 120 (recommended) for general use, 200 DPI for print quality. JPEG quality slider trades file size for visual sharpness — 75% is the sweet spot for most documents.

Compress and download

Click Compress and download. The output saves as {original}-compressed.pdf. A result panel shows the original size, the compressed size, and the saved bytes + percentage so you can decide whether to keep the new file or try a different mode.

Advertisement
After how-to · AD-W2 Responsive

PDF compression — two completely different operations under one name

"Compress a PDF" sounds like a single operation but it's actually two very different things. Lossless compression rebuilds the document's object graph, deduplicating shared resources (fonts, images, colour profiles) and stripping unused objects that accumulate during editing. The visible content doesn't change — every character, every pixel, every link survives intact. The savings come from getting rid of structural redundancy. For a well-managed PDF this can be 5-15%; for a PDF that's been through ten rounds of edit-and-save in Word, savings can hit 30%.

Destructive compression, by contrast, rebuilds the PDF as a series of compressed images. Each page is rendered to a raster at a chosen DPI and re-encoded as JPEG. The text becomes part of the picture — invisible to copy-paste, search, screen readers, and any downstream document processing. The savings are usually 50-90% on image-heavy PDFs because JPEG compression is far more aggressive than the lossless image formats most PDFs use internally. The trade-off is permanent.

Which mode should you choose?

Quick mode is the right default for any document that needs to remain editable, searchable, or accessible to assistive technologies. Legal contracts, technical specs, academic papers, anything destined for a knowledge base or compliance archive should always go through lossless compression. Aggressive mode is appropriate when the document is being delivered for visual consumption only — a marketing PDF emailed to a prospect, a presentation forwarded via WhatsApp, a printed report scanned and stored, anywhere the recipient won't need to interact with the text.

Quick mode preserves the document. Aggressive mode preserves the appearance. Pick based on whether the recipient is reading or working with the content.

The APAC bandwidth context

PDF compression matters disproportionately in APAC because mobile bandwidth is often the constraint. Indonesia, the Philippines, Vietnam, and Thailand all have large populations on mobile-first internet plans with monthly data caps where a single 20 MB PDF can represent a meaningful percentage of a working day's quota. India's document workflow — Aadhaar, PAN, GST submissions — relies on under-2-MB attachments for government portals. Singapore and Hong Kong's financial-services sectors require sub-5-MB PDFs for regulatory filings. Across the region, compression is the gating step between "this document is too large to send" and "this document is ready to share."

What this tool does — and what it doesn't yet

This compressor handles lossless re-save (text-preserving) and aggressive flatten-to-JPEG (text-destructive). It does NOT yet do image-only recompression — extracting individual embedded images from the PDF, re-encoding them at lower quality, and putting them back while preserving the surrounding text. That's the holy grail of PDF compression — biggest savings WITH text preserved — but requires walking pdf-lib's internal object graph in ways the library doesn't expose cleanly. It's on the v2 roadmap. For now, the trade-off is between modest lossless savings and big lossy savings.

10 Things to Know About PDF Compression

01

A PDF file is structured as an "object graph" — pages reference fonts, images, and other resources by ID. Compression removes duplicate references and unused objects.

02

The biggest contributors to PDF size are usually embedded images (often 80-95% of total bytes), then embedded fonts (5-15%), then page content streams (the rest).

03

PDFs natively support lossy JPEG, lossless ZIP/Flate, and CCITT (fax) compression for images. Aggressive mode forces JPEG everywhere — smallest files, slight quality loss on text-rendered-as-image.

04

The PDF spec supports "object streams" — a compression-of-the-compression technique that packs many small objects into one compressed block. pdf-lib enables this by default on save.

05

"Linearized" PDFs (sometimes called "fast web view") store objects in an order optimised for streaming. They open faster in browser viewers but typically have 5-10% larger file size.

06

Removing metadata can shave a few KB off a typical PDF. Removing duplicate fonts can shave a few hundred KB. Re-encoding images at lower quality can shave megabytes.

07

Adobe Acrobat's "Reduce File Size" tool is essentially what aggressive mode does — flatten + re-encode. The PDF spec doesn't define a "compression operation"; every tool does its own thing.

08

120 DPI is the sweet spot for screen-only PDFs — sharp enough to read on a phone, small enough to email. 200-300 DPI is needed only if the PDF will be printed.

09

JPEG quality 75% is the visual-perception threshold for most documents — at 75%, text remains crisp and image artefacts are invisible to most readers. Below 60%, artefacts become visible.

10

Compressing a PDF that's already heavily compressed can actually MAKE IT LARGER. If Quick mode grows the file, the source was already optimally compressed — use the original.

FAQ

  • No. pdf-lib runs in your browser; pdf.js renders pages locally for the aggressive mode. Your PDF is read into memory, compressed in memory, and saved straight back to your downloads folder. Open DevTools → Network and watch — zero outbound traffic.

  • The source was already optimally compressed. pdf-lib's re-save can occasionally add a few bytes of metadata overhead. If Quick mode doesn't reduce the file, the lossless savings are already exhausted — switch to Aggressive mode if you need a smaller file, or accept that the original is as small as it gets without losing content.

  • Quick mode: yes. The text content is untouched. Aggressive mode: no — text becomes part of a JPEG image. Copy + paste, text search, and screen-reader navigation all fail on the output. For documents that need to remain searchable, always use Quick.

  • Quick mode preserves them. Aggressive mode flattens pages to image, so form fields and hyperlinks on flattened pages are lost (the visual appearance survives, but they're no longer interactive).

  • 120 DPI for screen viewing and email attachments — small files, perfectly readable. 96 DPI for the absolute smallest output (slightly fuzzy text). 200 DPI if the PDF will be printed. Higher DPI = larger output, no visual benefit on screen.

  • 75% is the default and the sweet spot — visually identical to most readers, ~70% of the file size of quality 95. Drop to 60% if you need maximum reduction and don't mind subtle compression artefacts. Below 50% the artefacts become obvious.

  • Restriction-only protection (no-print, no-edit) is bypassed via pdf-lib's ignoreEncryption flag. Open-password protection is not — remove the password in Adobe Acrobat or macOS Preview first, then compress.

  • Soft limit: browser memory. Quick mode handles 500 MB+ PDFs comfortably. Aggressive mode is slower because each page must be rendered — keep mobile compressions under ~50 MB and desktop under ~200 MB for a smooth experience.

  • Aggressive mode renders each page from scratch via pdf.js, encodes the result as JPEG, then embeds it into the new PDF. That's three operations per page (render, encode, embed) versus a single re-save in Quick. A 100-page PDF in aggressive mode takes 30-90 seconds on desktop; the same PDF in Quick takes under a second.

  • Yes on iOS Safari and Chrome on Android. Quick mode is fast on any device. Aggressive mode is CPU-intensive — for a 50+ page PDF on a phone, expect to wait a minute or two. The progress indicator in the status bar updates per page.

Related News

You may be interested in these recent stories from our newsroom.

View all news →
Advertisement
Pre-footer · AD-W3 728 × 90

75 more free tools

Calculators, converters, security tools — no signup.