Skip to content
Shrinklyyshrinklyy
Explainers5 min read· Updated 2026-08-01

How PDF Compression Works: A Non-Technical Explanation

A PDF is a container for images, fonts and hidden data. Compression squeezes the heavy parts while leaving the pages you read intact.

Think of a suitcase: to make it lighter you’d fold better and leave out the boxes, not throw away the clothes.

Compression does the same: text, layout and page order stay, the heavy packing around it gets trimmed.

What is inside a PDF?

A PDF is not a flat image. It is a structured container that can hold text, fonts, vector drawings, images, and metadata, each stored with its own method. When someone says a PDF is ‘uncompressed,’ they usually mean the images inside were saved at high fidelity, the fonts were embedded in full, and no effort was made to trim metadata.

  • Images: often the largest part: photos, scans, logos, charts.
  • Fonts: the full typeface may be embedded even if you used only a few letters.
  • Metadata: creation history, thumbnails, and editing traces that viewers never show.
  • Structure: page tree and cross-references that can be streamlined.

The three techniques that actually shrink files

Almost all size reduction comes from these:

  • 1. Image re-encoding: each image is re-saved with smarter JPEG settings (lower quality number, optimized resolution). A 300 DPI photo re-encoded at 150 DPI and 60–75% quality can be 60–80% smaller while still looking crisp on screen.
  • 2. Font subsetting: instead of embedding an entire font (say, 200 KB for all glyphs), only the characters actually used are kept (often 10–20 KB). Readers never notice.
  • 3. Metadata and object cleanup: redundant objects, old edit history, and unused resources are removed. This is safe and never affects appearance.

How Shrinklyy does it in your browser

Older tools send your PDF to a server. Shrinklyy does the same steps: rendering pages and rebuilding the file: but right on your device.

For fixed targets (e.g., 500 KB), the engine tries a sequence of quality settings from gentle to strong and keeps the highest quality that still fits. For Custom levels, it applies a preset (Low/Medium/High/Maximum) directly so you control the trade-off.

Because nothing is uploaded, there is no queue, no storage, and no file to delete later. The compressed bytes are created in memory and handed to you as a download.

Tip: If you are curious, open your compressed PDF, go to Document Properties in your viewer, and look at file size vs page count: a well-compressed 10-page text report often sits under 500 KB.

Why some PDFs cannot shrink much further

A PDF that was already optimized: e.g., exported with ‘Smallest file size’ from Word or Acrobat: may have little slack left. Trying to force it from 400 KB to 100 KB will cost visible quality for minimal gain.

Conversely, a PDF that was built by inserting high-resolution JPGs at full size has enormous slack. Those files routinely shrink a lot with no visible loss.

Frequently asked questions

Quick answers to the questions readers ask most about this topic.

The output is a standard PDF that opens in every viewer. Adobe Reader, browsers, phones. Shrinklyy rebuilds the file with pdf-lib, which produces widely compatible PDFs.

Yes. Only unused glyphs are removed. Characters that appear in your document are fully preserved, so the text looks identical.

Text is vector-based and fonts are preserved precisely; photos are raster images that trade some detail for size. That trade-off is controllable via the compression level you pick.

Try these tools

Matched to the workflow described in this guide.

Related guides