Skip to content
DevToolKit

PDF Compress

Reduce PDF file size by compressing images, removing unused objects, and optimizing the internal structure. No upload required — compression runs entirely in your browser using WebAssembly for maximum privacy.

pdf

Drop your PDF here, or click to browse

Files are processed entirely in your browser — never uploaded

Processed locally
Was this tool helpful?

How to Use

Compress a PDF to reduce its file size:

  1. Upload your PDF — Drag and drop the file onto the upload area or click to browse your files. The tool displays the current file size immediately.
  2. Select compression level — Choose between Low (minimal quality loss, smaller reduction), Medium (balanced quality and size), or High (maximum compression, some visible quality reduction in images).
  3. Review settings — Optionally enable or disable specific optimizations: image recompression, unused object removal, stream deflation, and metadata stripping.
  4. Click "Compress PDF" — The tool processes the document locally. A progress indicator shows the current stage of optimization.
  5. Compare and download — The tool displays the original and compressed file sizes with the percentage reduction. Download the optimized PDF when satisfied.

The compression engine applies multiple optimization passes: first removing orphaned objects and duplicate resources, then recompressing image XObjects with tuned JPEG parameters, and finally deflating all content streams with optimal zlib settings. Each pass is independent, so you can selectively enable the techniques that matter most for your document.

About This Tool

PDF files grow large for several structural reasons, and understanding these causes reveals where compression gains are possible. The PDF format (ISO 32000-2:2020) stores content as a collection of typed objects — streams, dictionaries, arrays, and primitives — connected through a cross-reference table. Over successive edits, PDFs accumulate orphaned objects, duplicate resource entries, and incremental update sections that add bulk without contributing to the visible content.

Images are the primary driver of PDF file size. A single 300 DPI scan of a letter-sized page produces a 33-megapixel raw image (~100 MB uncompressed). PDF supports multiple image compression filters: DCTDecode (JPEG), FlateDecode (deflate/zlib), JBIG2Decode (bilevel), JPXDecode (JPEG 2000), and CCITTFaxDecode (fax-compatible). Many PDF generators embed images with suboptimal compression — for example, storing a photographic image with lossless FlateDecode instead of lossy DCTDecode, or using JPEG at quality 100 when quality 80 would be visually indistinguishable. Recompressing these images with appropriate codecs and quality settings is the single most effective compression technique.

Content streams — the instruction sequences that render text and vector graphics — use FlateDecode compression by default in most modern PDF generators. However, older tools or certain export pipelines may produce uncompressed streams (indicated by the absence of a /Filter entry). Applying zlib deflation to these streams typically achieves 60-80% compression ratios on text-heavy content. The compression is completely lossless; the deflated stream decompresses to the identical byte sequence of PDF operators.

Font subsetting is another significant optimization vector. PDFs created by word processors often embed entire font files (the full OpenType or TrueType program) even when the document uses only a small subset of glyphs. A complete font file for a typeface like Noto Sans CJK can exceed 16 MB. Subsetting the font to include only the glyphs actually used in the document can reduce the embedded font data by 90% or more. The subsetting process preserves all glyph outlines, hinting instructions, and kerning tables for the retained characters.

Metadata and structural overhead contribute a smaller but measurable portion of file size. XMP metadata packets, document information dictionaries, piece information dictionaries from authoring tools, and thumbnail images embedded for preview purposes can all be stripped without affecting the rendered content. Linearization tables (used for progressive web display) add approximately 1-3% overhead and can be removed if web optimization is not needed.

Why Use This Tool

Reducing PDF file size has practical benefits across many workflows:

  • Email delivery — Gmail, Outlook, and Yahoo impose a 25 MB attachment limit. A 40 MB report compressed to 12 MB fits within the limit without splitting the document or resorting to file-sharing links.
  • Web publishing speed — PDFs served on websites directly impact page load time and bandwidth costs. A technical manual compressed from 15 MB to 3 MB loads 5x faster for end users and reduces CDN egress charges.
  • Form submission portals — Government agencies, universities, and insurance companies frequently impose upload size limits on their web portals (often 5-10 MB). Compressing supporting documents ensures successful submission.
  • Mobile storage — On mobile devices with limited storage, compressed PDFs consume less space and open faster in PDF readers. A student carrying an entire semester of course materials benefits significantly from compression.
  • Cloud storage optimization — Storing thousands of archival PDFs in Google Drive, Dropbox, or SharePoint accumulates storage quickly. Compressing an archive of 10,000 documents by an average of 50% can reclaim hundreds of gigabytes.
  • Faster collaboration — In version control and review workflows, smaller files sync faster across devices, load more quickly in browser-based viewers, and reduce the time spent waiting during document exchanges.

Cloud-based compression services require uploading your documents to their servers, creating privacy and compliance risks for sensitive content. This tool processes everything locally in your browser, making it safe for legal documents, medical records, financial reports, and any file subject to data protection regulations like GDPR, HIPAA, or SOC 2.

FAQ

How much can the file size be reduced?
Reduction depends heavily on the original PDF content. Image-heavy documents typically see 40-80% size reduction because embedded images are recompressed. Text-heavy PDFs with already-compressed streams may see only 5-15% reduction since text data is inherently compact.
Does compression reduce the visual quality?
Image compression uses lossy JPEG recompression at configurable quality levels. At the default setting (quality 80), the difference is imperceptible for most documents. Text, vector graphics, and fonts remain completely lossless — only raster images are affected.
Is the compression done locally?
Yes. The entire compression pipeline runs in your browser. Your PDF is never uploaded to any server. This makes the tool safe for confidential documents, contracts, and any file containing sensitive information.
Can I compress a scanned PDF?
Yes, and scanned PDFs often benefit the most from compression. Scanned documents are essentially full-page images, and recompressing those images at a lower quality or resolution can reduce file size by 60-80% with minimal visible difference at normal viewing sizes.