Codrenix Toolbox logoCodrenix Toolboxby Codrenix
Back to Learn

How to Compress a PDF

Shrinking a PDF's file size is about knowing what's inside the file and what can be reduced. Here's a practical look at how compression works.

Why PDFs get large

A PDF file can grow large for several reasons, and understanding the cause helps you pick the right approach:

  • Embedded images: High-resolution photos and scans are the most common culprit. A single scanned page at 300 dpi can be 2–5 MB.
  • Embedded fonts: PDFs that include full font files (common with documents using non-standard typefaces) carry extra weight.
  • Redundant data: Repeated objects, unused elements, and accumulated edits from multiple saves can bloat a file.
  • Uncompressed content: Some PDF generators don't apply compression to images and streams in the first place.

What compression actually does

PDF compression typically works in two ways:

  1. Structural optimization: Removing redundant objects, compressing internal streams, and enabling object streams. This reduces file size without changing how the document looks.
  2. Image re-encoding: Reducing the resolution or quality of embedded images. This is where most size reduction comes from, but it's also where quality loss can occur.

Text-based PDFs (reports, letters, contracts created digitally) compress well through structural optimization alone. Image-heavy PDFs (scanned documents, brochures with photos) require image re-encoding for significant size reduction.

When compression works well — and when it doesn't

Good candidates for compression

  • Scanned documents saved at high resolution
  • PDFs with lots of embedded photos
  • Files that have been edited and saved multiple times
  • Documents created by tools that don't optimize output

Limited results

  • PDFs that are already compressed (some size reduction is still possible, but less dramatic)
  • Very small files (a 200 KB PDF won't shrink much further)
  • Documents where every pixel of image quality matters

How to compress a PDF

  1. Add your PDF to the compression tool and note the starting file size.
  2. Choose a compression level. Lighter settings preserve more image quality; stronger settings trade some sharpness for smaller size. Text stays readable at every level.
  3. Download and compare. Check the result at normal zoom — if images look acceptable, you're done. If not, try a lighter setting.

Compression and quality: being realistic

There's no free lunch with image-heavy PDFs. If a 30 MB scanned document needs to fit under 2 MB, some loss of image detail is unavoidable. The practical approach is to find the smallest setting that still produces an acceptable result for your purpose — a document that looks fine on screen doesn't need the same quality as one intended for print.

For documents where quality is critical, structural optimization alone (without aggressive image re-encoding) is the safer choice. The size reduction will be modest, but the document remains visually identical.

Need to shrink a PDF?

Compress PDFs in your browser with adjustable levels. See the before/after size before you download.

Compress a PDF