Compress PDF File

Reduce PDF file size for email sharing while maintaining text and scan clarity.

100% Client-Side • 100% Free

Drop a PDF file here, or browse

Select a PDF document to reduce file size

Browse PDF

100% private in-browser compression. Zero file uploads.

In-Depth Technical Guide•8 min read•2RUN Engineering Team
100% Client-Side • Zero Upload

Compress PDF Files Online: Downsample DPI, Recompress Images & Slash PDF Bloat

⚡How to Compress a PDF Document in Your Browser

1

Upload Your PDF File

Drag and drop your bloated PDF into the upload area or click to select from your device. The engine inspects current file size and embedded streams.

2

Select Compression Level

Choose between Recommended (150 DPI / Medium compression, ideal for print and email) or High Compression (72 DPI, ideal for maximum size reduction).

3

Preview Size Reduction in Real Time

Inspect the real-time savings meter showing original file weight, compressed file weight, and exact percentage reduction.

4

Download Your Optimized PDF

Click 'Download Compressed PDF' to save your lightweight, email-ready document to your local device in seconds.

PDF file bloat is one of the most persistent bottlenecks in modern digital business communication. A brief 10-page contract, medical record, or corporate marketing proposal can easily balloon between 25MB and 80MB. This massive footprint triggers email attachment bounces (colliding with Gmail and Outlook's 20MB–25MB ceiling), fails electronic court filing portals (CM/ECF), and clogs mobile downloads. Most of this bloat is completely invisible: un-downsampled 300 DPI scanner images, duplicated font subsets, and uncompressed binary content streams.

Our browser-native Compress PDF tool delivers industrial-grade PDF payload optimization directly inside your browser. By combining intelligent raster image downsampling (re-quantizing 300 DPI graphics to clean 150 or 72 DPI), lossless Flate stream compression, object stream consolidation, and unreferenced orphan pruning, our engine reduces PDF file sizes by 40% to 85% while retaining crisp, readable text. Crucially, all compression executes 100% locally in your browser memory via WebAssembly and PDF-Lib. Your private tax filings, legal contracts, and medical scans are compressed with absolute confidentiality and zero server uploads.

Read the full technical guide

The Root Causes of PDF Bloat: Raster Images, Fonts & Streams

To optimize a bloated PDF effectively, one must understand what consumes space inside an ISO 32000 container. Vector typography, line art, and geometric shapes consume negligible storage—typically only a few kilobytes per page. Over 90% of PDF file weight is almost always driven by three distinct elements:

1. High-Resolution Scanned Images: Modern office copiers scan documents at 300 to 600 DPI, saving uncompressed or lightly compressed color bitmaps into the PDF's `/XObject` `/Subtype /Image` dictionaries. A single full-color 600 DPI page scan can weigh 15MB alone. 2. Uncompressed Content Streams: Page drawing instructions and text layout operators (`/Contents`) are often stored as raw ASCII text rather than compressed binary streams. 3. Duplicated Font Subsets & Incremental Update Chains: Editing a PDF in legacy software repeatedly appends new revision chains to the end of the file without deleting old data, leaving megabytes of historical dead weight.

Image Resampling & Recompression: Downsampling from 300 to 150/72 DPI

Digital computer screens display images at 72 to 150 DPI (Dots Per Inch). Storing a 300 DPI or 600 DPI image inside a PDF intended for web viewing or email distribution represents massive overkill: the human eye on a laptop or smartphone cannot resolve the extra pixels, yet the mobile CPU must burn processing cycles downloading and decoding them.

Our compression engine inspects every embedded `/XObject` image stream. When compression is enabled, the engine resamples oversized raster graphics down to target resolutions: • 150 DPI (Recommended / Good Print Quality): The optimal commercial balance. Slashes file weight by 60% to 75% while ensuring that if the recipient prints the document on an office laser printer, photos and text remain sharp and clear. • 72 DPI (Maximum Web Compression): Drastic reduction for screen viewing. Slashes file weight by up to 85%, shrinking massive 50MB files down to 5MB for instant messaging and mobile sharing.

Flate Encoding & Content Stream Deflation

The PDF specification supports several stream filter algorithms. In unoptimized documents, text drawing operators, vector coordinates, and page descriptions are stored in plain ASCII text. Our tool applies the `/FlateDecode` filter (based on the industry-standard zlib/DEFLATE algorithm).

By analyzing repeating tokens in the page content streams (such as repeated font calls, coordinate transformations, and color operators), Flate encoding substitutes repeated strings with backward distance-length pointers and Huffman entropy codes, shrinking raw content streams by 70% to 80% with zero loss of vector sharpness.

Object Stream Consolidation: PDF 1.5 Cross-Reference Streams

In traditional PDF 1.4 architecture, every indirect object (numbers, dictionaries, arrays) is stored as a separate entry indexed in the plain-text XRef table. In documents containing thousands of tiny objects, the XRef table and object headers consume substantial storage.

Starting with PDF 1.5, Adobe introduced Object Streams (`/ObjStm`). Object streams allow multiple indirect objects to be packed together into a single compressed binary stream. Our engine reorganizes the document graph into compressed object streams, stripping redundant header tokens and significantly reducing structural container overhead.

Meeting Strict Email, Court & Visa Submission Limits

Compressing PDF files is a critical operational requirement across institutional filing portals: • Corporate Email Systems: Microsoft Exchange, Outlook 365, and Gmail enforce strict 20MB to 25MB attachment limits. A 28MB PDF attachment bounces immediately, delaying urgent deals. • Court Electronic Filing (CM/ECF): Federal and state court electronic case filing portals strictly mandate maximum file sizes (frequently 10MB to 25MB per document) and reject non-compliant briefs. • Immigration & Visa Portals: Government visa application portals (such as USCIS or UK Visas and Immigration) enforce brutal 2MB to 6MB limits on supporting financial documentation packets. Compressing your scans ensures compliance on the first submission.

Preserving Text Searchability, Vector Crispness & Form Fields

A major hazard of crude online 'PDF compressors' is that they convert the entire PDF into a raster image, destroying selectable text, stripping hyperlinks, and flattening fillable form fields.

Our engine performs intelligent selective compression. Vector text outlines, TrueType font glyphs, interactive hyperlinks, bookmarks, and fillable form fields (`/AcroForm`) are preserved with 100% mathematical fidelity. Users can continue to highlight text, search keywords (`Ctrl+F`), and click active URLs with zero degradation.

100% Client-Side In-Browser Security for Confidential Documents

Compressing documents frequently involves your most confidential personal and business assets: annual tax returns, payroll records, legal contracts, proprietary financial audits, and medical records. Transmitting these sensitive files to cloud-hosted online PDF compression websites creates grave data leak risks.

Our Compress PDF tool executes 100% locally inside your web browser. Built on client-side WebAssembly, HTML5 Canvas, and PDF-Lib, all stream parsing, image downsampling, and object compression occur strictly within your physical device's RAM. No files or text are ever transmitted across an external network connection, guaranteeing absolute privacy and full compliance with GDPR, HIPAA, and enterprise security policies.

💡Professional Best Practices for PDF Compression

  • •150 DPI is the sweet spot: Choose 150 DPI for business proposals and contracts; it preserves sharp print clarity while cutting file size by 60%–75%.
  • •Target under 20MB for email: Ensure your final file size remains below 20MB to guarantee smooth delivery through Gmail, Outlook, and corporate firewalls.
  • •Text remains 100% sharp: Our tool compresses only embedded raster images; vector text and font glyphs remain infinitely sharp at any zoom level.
  • •Check government portal caps: If submitting to USCIS or visa portals with 5MB limits, use High Compression to comfortably clear the threshold.
  • •Delete unnecessary pages first: Use our Delete Pages tool to remove redundant cover pages or blank sheets before compressing for maximum savings.
  • •Preserve searchable text: Selectable text and copy-paste capabilities are fully preserved, ensuring documents remain searchable with Ctrl+F.
  • •Zero server uploads: Rest easy knowing your tax forms, bank statements, and legal contracts are compressed 100% locally on your computer.

🛡️Technical Specifications & Stream Optimization Pipeline

The browser-native PDF compression engine implements a multi-stage optimization pipeline: 1. Binary Parsing & Stream Classification: The PDF buffer is parsed into an in-memory document graph. The engine iterates through the indirect object table, identifying `/XObject` dictionaries with `/Subtype /Image` and uncompressed `/Contents` streams. 2. Image Extraction & Canvas Resampling: For each image XObject, image bytes are extracted and decoded into an `ImageBitmap`. If the native resolution exceeds the target DPI (e.g. 150 DPI relative to page `/MediaBox` dimensions), the image is resampled onto an OffscreenCanvas with high-quality bicubic downsampling and re-encoded as an optimized JPEG byte stream (`/Filter /DCTDecode`). 3. Flate Deflation of Content Streams: Uncompressed text and vector drawing operators are compressed using zlib/DEFLATE compression, applying the `/FlateDecode` filter to minimize stream size. 4. Orphan Purging & Object Stream Packaging: Unreferenced objects and deprecated revision histories are excised. Remaining indirect objects are consolidated into compressed Object Streams (`/ObjStm`, PDF 1.5 standard). 5. Clean XRef Serialization: The engine computes updated byte offsets for all streams, constructs a modernized Cross-Reference Stream (`/Type /XRef`), and exports the finalized compressed binary Blob.

Stack: WebAssembly • Multi-threaded Web Workers • HTML5 Canvas API

Privacy: Files never leave your device or touch a cloud buffer; analytics run only with your consent.

Why choose client-side browser tools?

When you compress an image or merge a PDF on 2run tools, the code executes inside your browser tab using WebAssembly and Web Workers. We never stream your bytes to a remote cloud server. Your private financial reports, personal photos, and legal agreements never leave your device.

Total PrivacyIn-Browser
Instant ProcessingFast RAM
Truly UnlimitedZero Limits

Frequently Asked Questions

How much file size reduction can I expect?▾

Typical scanned documents and image-heavy PDFs achieve between 50% and 85% file size reduction. Documents containing uncompressed 300 DPI scanner images achieve the highest savings, often dropping from 40MB down to under 5MB.

Will compressing my PDF make the text blurry?▾

No! Our tool compresses only embedded raster images and applies lossless Flate compression to text streams. Vector text, fonts, and digital typography remain 100% sharp and crisp at any zoom level.

Will my document still have selectable and searchable text?▾

Yes! All selectable text, searchable keywords (Ctrl+F), copy-paste capabilities, and active hyperlinks are preserved with complete mathematical fidelity.

What is the difference between Recommended and High compression?▾

Recommended compression resamples images to 150 DPI, which provides an ideal balance of compact file size and sharp office printing. High compression resamples to 72 DPI, which maximizes size reduction for email and mobile viewing.

Can I compress password-protected PDFs?▾

If your PDF requires a password to open, you must first decrypt it using our Unlock PDF tool before running compression.

Can I compress PDFs on my smartphone?▾

Yes! Our tool is fully responsive and executes locally inside mobile Safari and Chrome on iOS and Android devices without requiring any app downloads.

Are my confidential files uploaded to any external server?▾

Never. All parsing, image downsampling, and PDF compression happen 100% locally inside your web browser. Your private documents never leave your physical device.

Sites Loading Under 0.8s
100/100 Lighthouse web engineering
Audit
Dev Arm for Design Agencies
White-label • Bilateral NDA
Partner
Technical SEO by Code
Deep Schema • Zero waste
Scale SEO
Custom Web Apps & SaaS
100% code ownership • Edge scale
Build
Turn Traffic into Sales
+34% sales lift • Fix bottlenecks
Audit