Online PDF Compressor — Local DPI, DCT Stream & Metadata Optimizer

Reduce PDF file size up to 90% 100% locally inside your browser RAM. Select Ghostscript-equivalent DPI profiles (96 DPI Screen, 150 DPI eBook, 300 DPI Print, or Smart < 10 MB Email target), fine-tune DCT image stream quality, convert color scans to Grayscale, and strip hidden XMP/Info metadata.

100% Privacy & Speed: Your PDF files are processed safely and privately. Documents never leave your device and are never uploaded to any external server.

🗜️ Select Compression Level:

Drag & Drop or select your PDF file

Supported all PDF documents (Up to 30 MB)

📊 PDF Compression Profiles & Ghostscript / ISO 32000 DPI Standards

Compression Profile Target Resolution (DPI) DCT Stream Quality Typical Size Reduction Recommended Use Case
Extreme / Screen (/screen) 72 – 96 DPI (1.0× scale) 50% (Aggressive) 75% – 90% smaller Strict portal upload limits (1–2 MB), quick mobile reading
Recommended / eBook (/ebook) 140 – 150 DPI (1.4× scale) 72% (Balanced) 50% – 70% smaller Corporate reports, invoices, web distribution, desktop viewing
Smart Email Target (< 10 MB) Adaptive 96 – 140 DPI 45% – 68% (Auto-scaled) Fits < 9.5 MB quota Gmail, Outlook, and corporate SMTP attachment limits
Low / Print Quality (/printer) 250 – 300 DPI (2.0× scale) 88% (High Fidelity) 20% – 35% smaller Office laser/inkjet printing, high-resolution contracts & scans

How PDF Compression Works: ISO 32000 Stream Filters, DPI Downsampling, and Local Browser Optimization

What This PDF Compressor Does

This utility compresses PDF files (up to 30 MB) directly inside your web browser by rasterizing and re-encoding page streams (`PDF.js` and `pdf-lib`) without uploading documents to a server. You can choose from four preset compression profiles—Low / Minimal (~250–300 DPI, 88% DCT quality for printing), Recommended (~150 DPI, 72% DCT quality), Extreme (~96 DPI, 50% DCT quality), or Email Target (< 10 MB)—or manually adjust the target resolution slider (72 to 300 DPI) and DCT image stream quality slider (30% to 95%). Optional checkboxes let you convert pages to 8-bit Grayscale (`DeviceGray`) and strip `/Info` document metadata (`Author`, `Creator`, `Producer`), with a live first-page preview, byte-reduction summary, and instant re-compression without re-uploading.

Whether you are submitting a scanned legal contract to a government portal with a strict 2 MB upload limit, attaching a multi-page architectural portfolio to a corporate email (10 MB to 25 MB SMTP ceiling), or archiving invoices on cloud storage, bloated PDF (Portable Document Format, ISO 32000-1) files create immediate bottlenecks. A single A4 page scanned at 600 DPI in uncompressed 24-bit color consumes over 99 megabytes of raw raster data.

Unlike traditional cloud PDF compressors that require you to upload confidential tax returns, medical records, or signed agreements to third-party servers, our Online PDF Compressor executes 100% locally inside your browser's memory using WebAssembly/Canvas rasterization (`PDF.js` + `pdf-lib`). You get instant control over target resolution (72 DPI to 300 DPI), Discrete Cosine Transform (`DCTDecode`) stream quality, 8-bit Grayscale luminance conversion, and document metadata stripping.

1. Why Are PDF Files So Large? Inside ISO 32000 Object Streams

A PDF file is not a simple flat text document; it is an indexed binary database consisting of four core structural sections: a header (`%PDF-1.7`), a body of indirect numbered objects, a cross-reference table (`xref`) storing byte offsets, and a trailer dictionary. Across millions of real-world documents, 85% to 95% of total PDF file weight comes from three sources:

  • Oversampled Raster XObjects (`/Subtype /Image`): Office multifunction scanners and smartphone document apps routinely embed full-page images at 300 DPI to 600 DPI, even when the document is only ever viewed on a 96 DPI or 144 DPI monitor. Because pixel count scales quadratically with resolution (Npixels ∝ DPI2), halving the resolution from 300 DPI to 150 DPI immediately eliminates 75% of all pixels.
  • Unoptimized Stream Filters (`/FlateDecode` vs. `/DCTDecode`): When photographic images or color scans are stored using lossless `/FlateDecode` (zlib/DEFLATE) instead of perceptual `/DCTDecode` (JPEG frequency quantization), paper grain and scanner sensor noise prevent efficient run-length compression.
  • Embedded Font Subsets, Incremental Updates & XMP Metadata: Repeatedly saving or signing a PDF appends incremental `xref` tables, bloated XML metadata packets (`/Metadata`), and unpurged document history.

2. The Mathematics of DPI Downsampling and Ghostscript Profiles

In professional prepress and document engineering (such as Ghostscript's `-dPDFSETTINGS` profiles), PDF optimization balances spatial resolution against human visual acuity at standard viewing distances:

Pixel Dimensions (A4 at D DPI) = (8.27 in × D) × (11.69 in × D)

  • Extreme / Screen Profile (`96 DPI`, `/screen`): Renders an A4 page at 794 × 1122 px (0.89 MP) with 50% DCT quantization. Ideal for strict 1 MB–2 MB university and visa application portals.
  • Recommended / eBook Profile (`150 DPI`, `/ebook`): Renders an A4 page at 1240 × 1754 px (2.17 MP) with 72% DCT quality. Delivers crisp, legible typography on laptops and tablets while cutting file size by 50% to 70%.
  • Smart Email Target (`< 10 MB`): Automatically calculates the ratio between your file's byte size and a safe 9.5 MB attachment threshold (accounting for Base64 MIME encoding overhead, which inflates email attachments by ≈ 33%), scaling both DPI and DCT quality dynamically.
  • Low / Print Profile (`250–300 DPI`, `/printer`): Renders an A4 page at up to 2480 × 3508 px (8.70 MP) with 88% DCT fidelity for physical laser or inkjet printing.

3. How Grayscale (`DeviceGray`) Conversion Saves up to 60% Extra Space

Many scanned contracts, invoices, and academic papers contain only black ink on white paper, yet scanners record them in 24-bit RGB (`DeviceRGB`, 3 bytes per pixel) to capture a single blue ballpoint signature or stamp. Enabling the Convert to Grayscale (B&W) option applies the ITU-R BT.709 perceptual luminance transform to every page canvas:

Y = 0.2126 R + 0.7152 G + 0.0722 B

Eliminating chrominance channels (Cb and Cr) zeroes out color quantization tables in the JPEG stream, reducing compressed stream size by an additional 30% to 60% while improving text contrast on yellowed or shadowed paper scans.

4. 100% Client-Side RAM Execution & Metadata Sanitization

Uploading sensitive PDFs—such as bank statements, NDAs, passport scans, or patient charts—to remote cloud servers exposes your organization to data breaches and GDPR/HIPAA compliance risks. Our engine processes every page inside an isolated browser memory buffer, explicitly zeroes out temporary HTML5 Canvas allocations (`canvas.width = 0`) after each page to prevent memory exhaustion on 100-page documents, and strips `/Info` dictionary fields (`Author`, `Creator`, `Producer`, `CreationDate`) before generating your clean download.

Frequently Asked Questions (FAQ) — Online PDF Compressor

Are my confidential PDF documents uploaded to any server during compression?

No. 100% of the PDF parsing, page rasterization, DCT stream compression, and PDF re-assembly takes place locally inside your web browser using JavaScript and HTML5 Canvas. Your files never leave your device.

Which compression level should I choose for emailing a PDF?

For general email attachments, choose "Recommended (150 DPI)", which typically shrinks PDFs by 50%–70% while keeping text sharp. If your original PDF is very large (15–30 MB), select "Email Target (< 10 MB)", which automatically scales DPI and quality to fit corporate email limits.

Can I fine-tune the exact DPI resolution and image quality myself?

Yes! Below the four preset cards, you can drag the Target Raster Resolution slider (72 DPI to 300 DPI) and the Embedded Stream DCT Quality slider (30% to 95%), then click "Re-Compress with Current Settings" to compare the exact output size.

Why does converting to Grayscale reduce PDF size so much?

Color scans store three color channels (Red, Green, Blue) and capture subtle color noise on white paper. Converting to Grayscale collapses all chrominance data into a single luminance channel, allowing DCT compression to pack pages up to 60% tighter.

What should I do if my PDF is password-protected or encrypted?

Encrypted PDFs lock their internal object streams so they cannot be modified until unlocked. If you upload a locked PDF, our tool will automatically offer a direct link to our local PDF Password Remover & Unlocker tool.

Does this tool remove hidden author and software metadata from the PDF?

Yes. When the "Strip PDF Metadata" box is checked (enabled by default), the rebuilt PDF omits hidden Author, Creator, Producer, Subject, and Keyword tags from the document header.