PDF Compression Explained: How It Works and How to Shrink PDFs Without Losing Quality

PDF size depends on content, image encoding, fonts and document structure. This guide explains common contributors and compression approaches; actual savings depend on the file and the changes allowed.

What's Inside a PDF File?

A PDF is essentially a container that holds multiple types of objects. Understanding these objects is the key to understanding file size:

  • Content streams — the actual page content: text operators, vector drawing commands, and references to embedded objects.
  • Images — often the largest component. A single uncompressed photo can be 10—30 MB inside a PDF.
  • Fonts: Embedded font data can contribute to size. The amount depends on the fonts, glyph coverage, embedding mode and compression; this guide does not establish a typical megabyte saving.
  • Metadata — author, title, dates and XMP properties. Accessibility structure tags are a distinct document structure and should not be treated as disposable descriptive metadata.
  • Cross-reference table — an index that maps every object to its byte offset, enabling random access.

Why Are Some PDFs So Large?

Common reasons for bloated PDFs:

CauseTypical ImpactSolution
Uncompressed or high-DPI images10—50 MB per imageDownsample to 150 DPI for screen, re-encode as JPEG
Full font embedding1—5 MB per fontSubset fonts (embed only used glyphs)
Scanned pages (image-only PDF)2—10 MB per pageRe-render at lower DPI, apply JPEG compression
Duplicate objects1—10 MBObject deduplication
Incremental saves2×–5× original sizeRe-save (flatten incremental updates)
Embedded multimediaVaries widelyRemove or link externally

PDF Compression Techniques

There are two categories of compression: lossless (no quality reduction) and lossy (quality trade-off for smaller size).

Lossless Techniques

These reduce file size without any visual change:

  • Flate/Deflate compression — the standard compression for content streams. Uses the same algorithm as ZIP files (zlib). Most modern PDFs already use this.
  • Object streams — groups multiple small PDF objects into a single compressed stream, reducing overhead. Introduced in PDF 1.5.
  • Cross-reference stream compression — replaces the text-based cross-reference table with a compressed binary stream.
  • Font subsetting: Embed the required glyphs and supporting data when the license and workflow permit. Savings depend on the actual font and usage; editing and conformance requirements still apply.
  • Duplicate object removal — if the same image appears on 10 pages, store it once and reference it 10 times.
  • Metadata stripping — remove unnecessary XMP metadata, thumbnails, and edit history.
Tip: Lossless re-saving may reduce size when the original uses less efficient object or cross-reference storage. Already optimized PDFs may not shrink, and re-saving can increase size. Compare the output rather than expecting a percentage saving.

Lossy Techniques

These trade some quality for significantly smaller files:

  • Image downsampling — reduce image resolution from 300 DPI to 150 or 72 DPI. A 300 DPI image has 4× the pixels of a 150 DPI image.
  • JPEG re-encoding — re-encode suitable raster images as JPEG. Savings and visible artifacts depend on the image, encoder and quality setting; PDF images are not necessarily embedded PNG files.
  • Color conversion: converting CMYK images to RGB can change appearance and output suitability. Four channels versus three does not imply a fixed 25% compressed-file saving; preserve the color requirements of the intended workflow.
  • Resolution capping — enforce a maximum DPI regardless of the source image's original resolution.

Image Resolution: What DPI Do You Actually Need?

Use CaseRecommended DPIReason
Screen viewing / email72–96 pixels per inch (starting point)Screen density, viewing size and zoom vary; inspect fine detail on target devices
Web download150 DPIGood balance of clarity and file size; test at the intended viewing size and zoom
Professional printing300 DPICommon raster-image starting point; ask the printer for its requirements
Large-format printing150–200 pixels per inch (starting point)Viewed from a distance, so lower DPI is acceptable
Math: Reducing a full-page image from 300 DPI to 150 DPI cuts pixel count by 75% (from ~8.7 million to ~2.2 million pixels on an A4 page). This pixel-count reduction does not establish a compressed-file size or percentage saving.

How Our Compress PDF Tool Works

The Compress PDF tool on SarvKit uses a dual-strategy approach:

  1. Strategy 1: Lossless re-save — re-serializes the PDF with object streams and cross-reference compression enabled. This catches the "easy wins" — bloated exports, incremental saves, uncompressed streams.
  2. Strategy 2: JPEG re-render — renders each page as a JPEG image and rebuilds the PDF. This is more aggressive and works well for scanned documents or image-heavy PDFs.
  3. Winner takes all — the lossless re-save runs by default. JPEG re-rendering runs only when you enable the lossy option. The tool offers a download only when a candidate is smaller; no reduction means these settings did not help, not that every possible optimization has been exhausted.

Everything runs in your browser using JavaScript — no files are uploaded to any server.

Best Practices for Keeping PDFs Small

  • Resize images before inserting — don't embed a 4000×3000 photo when the display area is 800×600 pixels.
  • Use vector graphics where possible — logos, charts, and diagrams as SVG/vector are tiny compared to raster images.
  • Save behavior varies by application. A full rewrite may remove incremental revisions or reduce size, but Save As alone does not prove that obsolete objects, metadata or sensitive content have been removed.
  • Subset fonts — use font subsetting when permitted by the font license and compatible with later editing or conformance needs.
  • Remove hidden content — hidden layers, annotations, comments, and form field data all add to file size.
  • Avoid PDF/A unless required — PDF/A requires compliant embedding of the glyphs used in the document, not necessarily the entire font. Compliant font subsets are permitted; file size depends on the content and conformance requirements.

Common Myths About PDF Compression

  • "ZIP-ing a PDF makes it smaller" — rarely. PDF content streams are already Deflate-compressed. An additional ZIP layer may save little or no space; measure the actual file.
  • “Removing metadata saves a lot of space” — savings vary. Inspect actual objects rather than assuming metadata is always only a few kilobytes; do not strip accessibility structure to chase size.
  • "Re-saving always helps" — only if the original wasn't well-optimized. A PDF exported from a modern tool with compression enabled may not benefit from re-saving.
  • "All compression is lossy" — lossless techniques (object streams, deduplication, subsetting) reduce size without any quality change.

Compression Results: What to Expect

PDF TypePotential (not a benchmark)Primary Technique
Word/PowerPoint exportDepends on the exportLossless re-save + font subsetting
Scanned documentsDepends on resolution and artifacts acceptedJPEG re-render at lower DPI
Image-heavy reportsDepends on image contentImage downsampling + JPEG re-encoding
Text-only PDFsMay be small or zeroObject stream compression
Already-optimized PDFsMay be zero or an increaseMinimal gains possible

Frequently Asked Questions

Not necessarily. Lossless techniques like font subsetting, object stream compression, and resource deduplication reduce size without any quality loss. Only lossy techniques like image downsampling or JPEG re-encoding affect visual quality, and even then the difference is often imperceptible at reasonable settings.
Savings depend on the original export, image content, resolution and settings. Re-rendering may shrink scans but discards document structure and can add artifacts. Text-only or already optimized PDFs may not shrink. Compare the actual output size and inspect all pages.
PDF streams may already be compressed, so ZIP can add little or even increase size. Savings depend on the file; compare actual output rather than expecting a fixed percentage.
Font subsetting embeds only the glyphs needed for the document rather than a complete font. Savings depend on the font, glyph set and export method; check rendering and any later editing requirements.
Document processing runs locally and the tool does not upload the file. The page can still load ordinary resources. This does not guarantee confidentiality, compliance or protection from browser extensions, shared devices or downloaded copies.

Ready to compress?

Open Compress PDF Tool →