pdf-tools 5 min read

How to Compress a PDF Without Uploading It Anywhere

Published: June 14, 2026
Stack of documents on a desk with a laptop in the background

Keyword target: “compress pdf without uploading” — ~40K monthly searches, privacy modifier significantly reduces competition. Top-ranking results are generic compression guides that never address the upload concern. Clear content gap.


There is a version of compressing a PDF that most people do not know exists: one where your file never leaves your computer. No upload bar. No waiting for a server. No wondering what happens to your document afterward.

Most online PDF compressors work by uploading your file to their infrastructure, running compression server-side, and sending the result back. For a random form you downloaded from a government website, this is a non-issue. For a contract, a medical record, or a financial statement, it is a different calculation entirely.

This guide covers why PDFs get large, which compression approaches actually work, and how to compress them without sending anything over the network.

Why PDF files get large in the first place

Understanding why PDFs bloat helps you compress them more effectively.

Embedded images are the biggest culprit. Every image in a PDF — photos, diagrams, scanned pages, logos — is stored as raw image data within the file. A scanned document at 300 DPI with 10 pages can easily reach 50MB because each page is essentially a high-resolution photograph. The PDF wrapper adds almost nothing to the size; the images are the weight.

Embedded fonts add size. PDFs embed the fonts used in the document so they render correctly on any device. A document using three custom fonts might carry 1-3MB of font data regardless of how long the text is. Standard fonts like Helvetica and Times Roman are not embedded because every PDF reader already has them — using standard fonts keeps files smaller.

Duplicate objects inflate PDFs. The PDF format stores content as objects with cross-references. Some PDF generators — particularly those that create PDFs from web pages or print drivers — create duplicate objects: the same image stored twice, the same font embedded multiple times, redundant metadata blocks. This is inefficient and inflates file size without adding any value.

Revision history accumulates. When you edit and re-save a PDF repeatedly in some applications, the software appends the changes rather than rewriting the file from scratch. A document edited twenty times may contain twenty versions of its content stacked inside a single file. The displayed version is always the latest, but all previous versions are still in the file.

What compression actually does

PDF compression tools reduce file size through several mechanisms:

Image downsampling reduces the resolution of embedded images. A scanned page at 300 DPI has four times as many pixels as the same page at 150 DPI. For on-screen reading, 150 DPI is indistinguishable from 300 DPI. For printing, 150 DPI is acceptable for most purposes. Tools that offer “screen quality” vs “print quality” compression are essentially choosing image downsampling levels.

Image recompression takes existing images in the PDF and applies more aggressive compression. A PNG image embedded in a PDF can be recompressed as JPEG at 80% quality, reducing its size significantly with minimal visible degradation. This is the primary mechanism in most online PDF compressors.

Object stream compression rebuilds the PDF’s internal structure, removes duplicate objects, and applies deflate compression to the cross-reference table and object streams. This is what pdf-lib’s useObjectStreams: true option does — it rebuilds the file from scratch in a more efficient form. This technique works well on PDFs with duplicate content and revision history but has limited impact on image-heavy documents.

Font subsetting removes unused characters from embedded fonts. If a document uses a font with 900 glyphs but only 50 specific characters appear in the text, font subsetting reduces the embedded font to just those 50 characters. Significant savings for documents with multiple custom fonts.

Methods that do not require uploading your file

Browser-based compression

Modern browsers can run PDF manipulation libraries using JavaScript and WebAssembly. The same algorithms that run on servers can run in your browser tab, on your processor, without any network communication.

TinyTransform’s Compress PDF tool uses pdf-lib running in-browser. When you drop a PDF, the library loads the file into your browser’s allocated memory, rebuilds it with object stream compression and duplicate object removal, and offers the result as a download. Nothing is transmitted over the network — you can verify this by opening your browser’s DevTools Network tab before processing and confirming no outbound requests appear.

This approach works well for PDFs that are large due to revision history, duplicate objects, or inefficient structure. For image-heavy PDFs (scanned documents, photo PDFs), the reduction is more modest because browser-based compression does not currently do aggressive image resampling the way server-side tools do.

Desktop applications

Adobe Acrobat Pro’s File → Reduce File Size (or Save As Other → Reduced Size PDF) performs comprehensive compression including image downsampling. It is the most capable option but costs $20+/month.

Preview on macOS has a PDF compression option under File → Export, with a Quartz filter. The default “Reduce File Size” filter is aggressive to the point of making text blurry — not recommended. You can create a custom Quartz filter with more conservative settings using ColorSync Utility, but it requires some technical setup.

Ghostscript is a free open-source tool available on all platforms. The command gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf compresses a PDF with ebook-level settings (150 DPI images). It is powerful but requires comfort with the command line.

Compression settings explained

Most PDF compressors offer quality presets. Here is what they typically mean:

Screen quality (72 DPI): Maximum compression, minimum quality. Images are reduced to screen resolution, which looks fine on monitors but terrible if printed. File sizes can drop 80-95%. Use for PDFs that will only ever be read on screens and never printed.

eBook quality (150 DPI): Balanced compression. Images are reduced to a resolution that looks good on screens and prints acceptably. File sizes typically drop 50-75%. This is the right setting for most shared documents.

Printer quality (300 DPI): Moderate compression. Images remain at print resolution. File sizes drop 20-40% through structural optimization and font subsetting. Use for documents that will be printed.

Prepress quality (300+ DPI with color management): Minimal compression. Used for professional print production. Not relevant for typical document sharing.

What to expect from compression

The reduction you see depends entirely on what is making your PDF large.

A 10-page text document with embedded fonts: browser-based structural compression can reduce it 10-30%.

A 10-page document with one large infographic: 40-60% reduction possible through image recompression.

A 10-page scanned document at 300 DPI: 50-80% reduction possible with image downsampling (requires more aggressive compression than browser-only tools currently offer).

A PDF that has been compressed before: minimal further reduction. You cannot compress something that has already been compressed optimally.

Privacy and sensitive documents

The reason browser-based compression matters beyond convenience is the content of the files people typically need to compress: contracts before emailing to clients, financial documents going to accountants, medical records being submitted to insurance companies, legal filings with personal information.

These files contain information worth protecting. Every major online PDF compressor — Smallpdf, iLovePDF, PDF24, Adobe Online — uploads your file to their servers. Their stated retention policies range from immediate deletion to 24 hours. These are unverifiable claims enforced by no external party.

Browser-based compression eliminates the upload entirely. The file exists in your browser’s memory allocation for the duration of the process and nowhere else. Whether your document contains sensitive personal information or not, this is simply a more appropriate way to handle files you would not want read by strangers.

Step by step: compress a PDF in your browser

  1. Open Compress PDF
  2. Drag your PDF onto the drop zone or click to browse
  3. The tool displays the original file size
  4. Click Compress PDF
  5. The compressed file size appears alongside the original
  6. Click Download to save the result

For most structural compression cases, the process takes under five seconds. For larger files, it may take 10-15 seconds as pdf-lib rebuilds the object structure.

If the result is not small enough for your needs — for instance, you are trying to get a scanned document under an email attachment limit — consider pairing browser compression with an image-heavy PDF conversion workflow: convert each page to JPG at moderate quality using PDF to JPG, then reassemble with JPG to PDF. This gives you direct control over image quality and typically achieves much higher compression ratios for scan-heavy documents.

Enjoyed this guide? Share with others: