How to Compress a PDF Without Losing Quality
PDFs are one of the most common file formats for sharing documents, but they can get surprisingly large. A PDF with embedded images, fonts, or scanned pages can easily exceed email attachment limits (usually 25 MB). Compressing a PDF reduces its file size while keeping the content intact and readable. A browser-based compressor handles the entire job locally without uploading your document to a server.
Why PDFs get so large
Not all PDFs are created equal. A simple text document might be 50 KB, while a scanned contract could be 20 MB. The main factors:
- Embedded images: photos and scans are often stored at full resolution inside the PDF, even when they do not need to be
- Embedded fonts: PDFs can include entire font files to ensure consistent display, adding hundreds of KB per font
- Metadata and hidden layers: editing history, form data, and invisible objects add up
- Redundant objects: when a PDF is created by merging or editing, duplicate data can accumulate
- Uncompressed streams: not all PDFs use optimal compression internally; some store data uncompressed
- Embedded thumbnails: some PDFs cache rendered thumbnails of every page, adding bulk
- Embedded multimedia: audio, video, and 3D models can balloon PDF size
- Optical character recognition (OCR) layers: searchable scanned PDFs include a text layer plus the image layer
How to compress a PDF online
- Upload your PDF: drop your file (up to 100 MB) into the upload zone or click to browse.
- Select a compression level: choose Light (10-20% reduction, best quality), Medium (20-35%, balanced), or Heavy (30-50%, maximum compression).
- Compress and download: click "Compress PDF" to process in your browser, then download the smaller file. The tool shows you the size reduction.
A brief history of PDF compression
PDF (1993) was designed from the start with compression in mind. The original PDF 1.0 spec included FlateDecode (the same Deflate algorithm as ZIP and PNG) for general data, and JPEG embedding for images. Over the years, PDF added:
| Version | Year | Compression added |
|---|---|---|
| 1.0 | 1993 | FlateDecode (zlib/Deflate), JPEG, CCITT Fax |
| 1.2 | 1996 | LZW compression (with patent concerns) |
| 1.4 | 2001 | JBIG2 for bilevel images (high compression for scans) |
| 1.5 | 2003 | JPEG 2000, object streams, cross-reference streams |
| 1.7 / Ext 3 | 2009 | Improved metadata compression |
| 2.0 | 2017 | Better stream linearization for fast web viewing |
Modern PDF compression tools rebuild the PDF with the most efficient encoding for each object. A poorly-encoded PDF can shrink by 50% just from re-encoding without any quality loss. PDFs from older tools (early 2000s) compress dramatically more than PDFs from modern tools that already use efficient encoding.
The free Ghostscript library (since 1986, predates PDF itself) has been the de facto PDF compression engine for the open-source world. Most browser-based compressors use a port of Ghostscript or pdf-lib (JavaScript) to do the work.
Choosing the right compression level
Light compression removes metadata, unused objects, and optimizes the internal structure. This is safe for any document, text and images stay untouched.
Medium compression additionally reduces image resolution for embedded images. Good for documents you are sharing digitally where print-quality images are not necessary.
Heavy compression aggressively reduces image quality. Use this when you need the smallest possible file and the document is primarily text. Image-heavy PDFs will show visible quality loss.
Compression techniques in detail
| Technique | What it does | Quality cost |
|---|---|---|
| Stream re-encoding | Re-compress object streams with zlib/Deflate | None, lossless |
| Image downsampling | Reduce DPI of embedded images (300 → 150) | Image quality loss, text fine |
| Image re-encoding | Re-encode JPEG at lower quality (95% → 75%) | Image quality loss |
| Image format conversion | Convert PNG to JPEG for photos | Conversion artifacts |
| Font subsetting | Embed only used glyphs, not entire font | None |
| Remove unused objects | Strip orphaned data | None |
| Remove duplicates | Deduplicate identical streams | None |
| Strip metadata | Remove author, history, comments | Privacy improved, content unchanged |
| Linearization | Reorder for fast web viewing | None, slight overhead |
| Remove thumbnails | Strip cached page previews | Viewer must re-render thumbnails |
| OCR layer flatten | Combine separate text and image layers | Searchability may change |
A good compressor applies the lossless techniques (re-encoding, subsetting, deduplication) before any quality-affecting ones. Some compressors expose all knobs; others use presets.
Image resolution targets
For different uses, different DPI settings make sense:
| Use | Recommended DPI | Why |
|---|---|---|
| Print (professional) | 300 DPI | Industry standard for high-quality print |
| Print (home) | 200 DPI | Sufficient for office printers |
| Screen viewing | 150 DPI | Sharp on standard monitors |
| Email attachment | 100-150 DPI | Balances size and readability |
| Web embedding | 96 DPI | Standard screen resolution |
| Mobile preview | 72 DPI | Smaller files, still readable on phones |
A scanned PDF at 600 DPI compressed to 150 DPI typically loses 70-80% of the file size with no visible quality difference on screen.
Common pitfalls
- Compressing already-optimized PDFs: a PDF that has been compressed before may not shrink further (or may shrink very little). Verify your savings.
- Quality loss on text photos: heavy compression of a scanned text document can blur the characters and make OCR fail. Use Light or Medium for documents you want to keep searchable.
- Color shift: aggressive JPEG re-encoding can shift colors slightly. For brand documents, verify color accuracy after compression.
- Form fields broken: some compressors flatten interactive forms into static images, losing fillability. Test forms before sending.
- Digital signatures invalidated: a signed PDF, if compressed (which modifies the file), loses its cryptographic signature. Re-sign after compression.
- Searchable text lost: aggressive compression of scanned PDFs may flatten the OCR text layer, breaking search.
- Annotations or comments removed: some compressors strip annotations to save space. If comments matter, verify.
- Linearization disrupted: a PDF optimized for fast web viewing (linearized) may need re-linearization after compression.
- Embedded font replaced: if the compressor cannot subset an embedded font, it may substitute a default, changing the appearance.
- Page order changed: very rarely, compression that involves rebuilding internal structure can swap pages. Verify page order.
- Watermarks removed: some "optimize" PDF compressors aggressively remove "unused" objects, sometimes including watermarks.
Tips for smaller PDFs
- Compress before emailing: most email providers cap attachments at 25 MB. A quick compression often brings a PDF under the limit.
- Remove unnecessary pages first: if you only need to send part of a document, split out the relevant pages, then compress. Less content means a smaller file.
- Check the result: open the compressed PDF and scroll through it before sending. Make sure text is readable and any important images look acceptable.
- Keep the original: always compress a copy. If you need the full-quality version later, you want to have it.
- Strip metadata for privacy: PDF metadata often includes author name, software used, and edit history. Stripping metadata both reduces size and improves privacy.
- Convert color PDFs to grayscale if appropriate: a color scanned contract converted to grayscale shrinks 50-70% with no functional loss.
- Use a different tool for image-heavy PDFs: for design portfolios or magazines, a dedicated image-optimization workflow (resize source images first, then export) often beats compressing the final PDF.
- Pre-flight for print: if compressing for a print workflow, run the PDF through a pre-flight check to make sure no critical data was lost.
When not to compress
Some PDFs should stay at full size:
- Print-ready files: if the PDF is going to a professional printer, keep images at their original resolution
- Legal or archival documents: when every detail matters, avoid lossy compression
- Already-small files: a 200 KB text PDF will not benefit from compression
- Court-filed documents: many courts require unmodified PDFs; compression modifies the file structure
- Notarized or signed PDFs: compression invalidates digital signatures
- PDFs with embedded multimedia: heavy compression can break embedded audio or video
Alternative approaches
If browser compression does not shrink enough:
- Adobe Acrobat Pro: built-in "Reduce File Size" with many presets, generally produces smaller output than free tools.
- Ghostscript (command line):
gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebookproduces aggressive compression. - PDFsam: free desktop tool with batch compression for multiple PDFs.
- macOS Preview: a basic compress feature available in Export As > PDF > Quartz Filter > Reduce File Size.
- Online services: cloud compressors (Smallpdf, ILovePDF) may achieve more aggressive compression but require uploading.
- Print to PDF with low DPI: opening the PDF and printing-to-PDF with low DPI flattens everything and produces a smaller file (but loses searchability).
- Convert to JPEG-only PDF: rendering each page as a JPEG, then assembling them into a new PDF, produces tiny but flat (non-searchable) output.
For confidential PDFs that should not leave your machine, browser-based compression (this tool) or local desktop tools (Adobe Acrobat, Ghostscript) are the only safe options.
Privacy and confidential PDFs
The PDF compressor runs entirely in your browser. The PDF you upload, intermediate processing, and the compressed output all stay on your device. Nothing is uploaded to a server, logged, or shared with anyone.
This matters because PDFs you compress are often very sensitive: signed contracts ready to email, financial statements, scanned passports for travel documents, medical records being sent to a specialist, internal corporate reports under embargo, employee records, legal pleadings, tax returns. Cloud PDF compressors by design upload your files to their servers, often retain them for "service improvement," and have been involved in real data leaks where confidential contracts and personnel records ended up indexed by search engines. A browser-based compressor has zero exposure: the PDF never leaves your machine.
Browser-based compression also works offline once the page is loaded, useful for processing documents on airplanes, in secure facilities without internet access, or anywhere you cannot or should not upload a confidential document to a third party.
Frequently Asked Questions
How much can I reduce my PDF file size?
It depends on the content. Text-heavy PDFs may only shrink 10-20%, while PDFs with large embedded images can be reduced by 30-50% or more.
Does compression reduce PDF quality?
Light compression preserves quality by removing unused data and metadata. Heavy compression may reduce image quality in image-heavy PDFs, but text remains sharp and readable.
Will the compressed PDF still be printable?
Yes. Compressed PDFs are fully functional, they can be printed, viewed, and shared just like the original. Text quality is unaffected by compression.
Is it safe to compress sensitive PDFs online?
Yes, when using a browser-based tool. Your PDF is processed entirely on your device and is never uploaded to any server.