Your files never leave your device. All processing happens locally in your browser.
How do I compress a PDF to a smaller file size online without uploading it?
Open Compress PDF, pick a target size (200 KB is the default, and presets run from 50 KB up to 25 MB, plus Email, WhatsApp and Government-portal targets), then drop your PDF onto the page. The tool rebuilds the document to hit that size and shows the before/after with the exact percentage saved, offering three quality variants — Best Quality, Balanced and Smallest — so you can trade sharpness for size. Everything runs in your browser with Mozilla’s pdf.js and pdf-lib, so nothing is uploaded and your PDF never leaves the tab; the result downloads as your file name with a ‘-compressed.pdf’ suffix.
Target-driven: choose a size (50 KB–25 MB, or Email / WhatsApp / Government-portal presets) and the tool compresses to fit
Three quality variants — Best Quality, Balanced and Smallest — generated in one pass so you pick the sweet spot
Shrinks image-heavy and scanned PDFs by re-encoding pages as JPEG at a lower DPI and quality, then rebuilding with pdf-lib
Optional Force Grayscale and Remove Metadata (on by default) squeeze the file further
Runs entirely in the browser with pdf.js and pdf-lib — no upload, no install, no account; works offline once cached
What is
Compress PDF
Compressing a PDF means reducing its file size so it is easier to email, upload to a portal or store, while keeping the pages readable. Most of a PDF’s weight is usually its images and scanned pages, so a compressor shrinks the file mainly by down-sampling those images to a lower resolution (DPI) and re-encoding them with more aggressive lossy JPEG compression; it can also strip metadata and convert pages to grayscale for extra savings. Text-only PDFs are already compact and shrink far less than image-heavy or scanned ones. Compression can be lossless (rearranging and de-duplicating data with no visible change, but modest savings) or lossy (re-encoding images, trading some sharpness for a much smaller file). This tool takes a target size — say 200 KB — and automatically tunes DPI, JPEG quality and grayscale to reach it, rendering pages with Mozilla’s pdf.js and rebuilding the document with pdf-lib entirely on your device, so no cloud service is involved and the file is never uploaded.
No. The PDF is read and compressed entirely in your browser, so the file never leaves your device — there is no upload, server or account.
Nothing is uploaded. When you drop or pick a PDF, the tool reads it locally with the browser’s File API, renders its pages in memory with the pdf.js engine (whose worker is bundled locally, not fetched from a CDN) and rebuilds the compressed file with the pdf-lib library on your own machine. There is no server, upload, database, API or tracking in the processing path, so contracts, bank statements, ID scans and private paperwork stay on your device; the tool works offline once cached, and closing the tab discards everything. The only optional network use anywhere on the site is consent-gated advertising, which never sees your files.
You choose a target — presets run from 50 KB up to 25 MB, plus Email, WhatsApp and Government-portal targets — and the tool compresses to fit. 200 KB is the default.
Pick the target that matches where the PDF is going: 200 KB (the default, sized for government and job-portal uploads), 500 KB, 1 MB, 2 MB or 5 MB from the buttons, or one of the dedicated pages for exact targets from 50 KB to 25 MB and the Email, WhatsApp and Government-portal presets. The tool tunes DPI, JPEG quality and grayscale to land at or under the target and shows the actual result with the percentage saved. How close it gets depends on the source: an image-heavy or scanned PDF can shrink dramatically, while a small text-only PDF may already be under the target or unable to go much lower — if it cannot reach the goal, it tells you the smallest size it achieved and suggests enabling grayscale.
For image-heavy PDFs, a little — real reduction is lossy, so pages are re-encoded at a lower resolution. You pick Best Quality, Balanced or Smallest to control the trade-off.
Real size reduction on scanned or image-heavy PDFs comes from lossy compression: the tool down-samples the page images to a lower DPI and re-encodes them as JPEG, which is why a big file can become small. That trades some sharpness for size, so the tool generates three variants in one pass — Best Quality (highest DPI and JPEG quality), Balanced, and Smallest (lowest) — and defaults to Best so you step down only as far as you need. One honest note: when pages are rebuilt as images to hit an aggressive target, the text in those pages becomes part of the picture and is no longer selectable; if you need the text to stay selectable, choose a larger target or a lighter variant. Turning on Force Grayscale or Remove Metadata shrinks the file further.
PDFs balloon from high-resolution scans and photos. Compress it to fit your limit — the Email preset targets under 10 MB and WhatsApp under 16 MB.
Most oversized PDFs are heavy because they contain full-resolution scanned pages or embedded photos, which store far more data than the text needs. Compressing re-encodes those images at a sensible screen resolution, which is usually enough to slip under an attachment limit — Gmail and Outlook cap attachments around 25 MB, WhatsApp around 16 MB for documents, and many government or job portals demand 200 KB–500 KB. Use the matching preset (Compress PDF for Email targets under 10 MB, Compress PDF for WhatsApp under 16 MB, Compress PDF for Government Portal around 200 KB) or a type-in target page, drop the PDF, and download the smaller version — all without your document ever leaving the browser.
Detailed Explanation
📖How It Works
Compressing a PDF to a Target Size, Entirely in the Browser
Compress PDF shrinks a document to a size you choose without uploading a single byte. Pick a target — 200 KB is the default, with presets running from 50 KB up to 25 MB, plus dedicated Email, WhatsApp and Government-portal targets — then drop your PDF onto the page. The tool renders the pages in the browser with Mozilla’s pdf.js, re-encodes their images at a lower resolution and JPEG quality, and rebuilds the document with pdf-lib, all on your device. It produces three quality variants in a single pass — Best Quality, Balanced and Smallest — and shows the original versus new size with the exact percentage saved, so you can pick the smallest file you are still happy with. If it cannot reach the target, it tells you the smallest size it achieved and suggests enabling grayscale, and the finished file downloads with a -compressed.pdf suffix.
Target-driven: 200 KB default, presets 50 KB–25 MB, plus Email, WhatsApp and Government-portal targets
Renders and rebuilds in the browser with pdf.js and pdf-lib — no upload, no install, no account
Three quality variants in one pass (Best Quality, Balanced, Smallest) with a live before/after and percentage saved
Honest fallback: reports the smallest achievable size and suggests grayscale when a target cannot be met
📋Use Cases
When Compressing a PDF Is the Right Move
Compression is the fix whenever a PDF is too big for where it needs to go. The most common case is an attachment that bounces or a portal that rejects the upload: Gmail and Outlook cap attachments around 25 MB, WhatsApp allows documents up to about 16 MB, and government, exam and job portals frequently demand 200 KB–500 KB. Scanned documents are the usual culprits — a phone scan or flatbed scan stores each page as a full-resolution photo, so a few pages can weigh tens of megabytes even though the content is mostly text. Compressing re-encodes those page images at a sensible screen resolution, which is enough to slip under the limit while keeping the pages readable. Dedicated presets make the common targets one click: Compress PDF for Email (under 10 MB), Compress PDF for WhatsApp (under 16 MB) and Compress PDF for Government Portal (around 200 KB), alongside exact-size pages from 50 KB to 25 MB for form fields that specify a precise ceiling.
Fits PDFs under email limits (~25 MB Gmail/Outlook), WhatsApp (~16 MB) and portal caps (200 KB–500 KB)
Ideal for scanned documents, which store each page as a heavy full-resolution photo
One-click presets for Email, WhatsApp and Government-portal targets
Exact-size pages from 50 KB to 25 MB for forms that specify a precise ceiling
🔧Technical Details
How Smart Compression Works
On load, the PDF is read into an ArrayBuffer with the browser File API and opened with pdf.js (pdfjs-dist), whose worker is bundled with the app locally rather than fetched from a CDN; a first-page thumbnail and the page count are shown. The heavy work runs in a smartCompressPDF routine that pursues two strategies and keeps whichever wins. First it re-encodes the embedded images at reduced JPEG quality and scale; then, for aggressive targets, it rasterises whole pages — pdf.js paints each page onto a canvas at a chosen DPI and the canvas is encoded as JPEG — and a new PDF is assembled from those images with pdf-lib. Three configurations run in one pass: Best Quality (highest DPI and JPEG quality), Balanced, and Smallest (lowest DPI and quality), so you get three files to choose from and the app defaults to Best. Optional Force Grayscale converts pages to black and white for a smaller file, and Remove Metadata (on by default) strips author, dates and other info. The tool compares each variant against the target, picks the smallest that still fits, reports the exact percentage saved, and — if nothing reaches the goal — surfaces the smallest size it managed with a suggestion to enable grayscale.
pdf.js (pdfjs-dist) renders pages to a canvas; its worker is bundled locally, not from a CDN
Two strategies: re-encode embedded images, and full-page rasterise-to-JPEG rebuilt with pdf-lib for aggressive targets
Three variants generated in one pass (Best/Balanced/Smallest) by varying DPI and JPEG quality; defaults to Best
Force Grayscale and Remove Metadata (on by default) add further reduction; the winning variant is the smallest that fits the target
⚠️Limitations
Honest Limitations
How much a PDF shrinks depends entirely on what is inside it. Image-heavy and scanned PDFs compress dramatically because their photos can be re-encoded, but a text-only PDF is already compact and may be at or below the target with little room to go lower — asking for an unrealistically small target on such a file simply returns the smallest it can reach with a clear warning. The real savings come from lossy compression, so there is a genuine trade-off: to hit an aggressive size the tool rebuilds pages as JPEG images, which means the text on those pages becomes part of the picture and is no longer selectable or searchable; if selectable text matters, choose a larger target or the Best Quality variant. Everything runs in browser memory, so a very large or high-page-count PDF is bounded by your device’s RAM, and the tool compresses one PDF at a time rather than a batch. The file must be openable by pdf.js and pdf-lib — a password-protected or corrupt document reports a clear error instead of a broken result.
Text-only PDFs are already small and shrink far less than image-heavy or scanned ones
Aggressive targets rasterise pages, so their text becomes an image and is no longer selectable — use a larger target for selectable text
In-memory processing bounded by device RAM; one PDF at a time, not a multi-file batch
The PDF must be parseable; password-protected or damaged files report a clear error
🔒Privacy & Security
Privacy: Your PDF Never Leaves the Tab
PDFs are often exactly the sensitive kind — contracts, bank statements, medical records, ID scans, signed agreements — and this tool is built so none of it leaves your machine. The file is read with the browser File API, rendered entirely in memory with pdf.js (whose worker is bundled locally, so no third-party CDN is contacted), and the compressed document is rebuilt with pdf-lib on your own device. There is no server, upload, database, logging, API or CDN anywhere in the processing path, and the finished PDF is generated locally and downloaded straight from a Blob. The tool works offline once the page has been cached, and closing the tab discards every byte. There is no login and no telemetry, and the only optional network use anywhere on the site is consent-gated advertising, which never sees your files.
PDF read, rendered and rebuilt entirely in the browser
No server, upload, database, API or CDN in the processing path; pdf.js worker bundled locally
The compressed PDF is built on-device and downloaded from a local Blob; works offline once cached
No login or telemetry; closing the tab discards everything
Three files generated in one pass by varying DPI and JPEG quality; the app defaults to Best
Method
Lossy image re-encode + rebuild
pdf.js renders pages, images are re-encoded as JPEG at a lower DPI, and pdf-lib rebuilds the document
Options
Grayscale, Remove Metadata
Force Grayscale for extra reduction; Remove Metadata (author, dates) on by default
Best for
Scanned and image-heavy PDFs
Text-only PDFs are already compact and shrink far less; a clear warning shows if a target cannot be met
Privacy & scale
In-memory, bounded by RAM
Rendered and rebuilt on-device with pdf.js and pdf-lib, one PDF at a time; 100% client-side, no upload
Compress PDF reduces a document to a target size in the browser: pdf.js renders the pages, their images are re-encoded as JPEG at a lower DPI and quality, and pdf-lib rebuilds the file, producing three variants (Best Quality, Balanced, Smallest) to choose from with a live before/after and percentage saved. Targets run from 50 KB to 25 MB plus Email, WhatsApp and Government-portal presets, with optional Force Grayscale and Remove Metadata. Savings depend on the source — scanned and image-heavy PDFs shrink dramatically while text-only PDFs shrink little — and aggressive targets rasterise pages so their text is no longer selectable. Everything runs on-device, one PDF at a time; nothing is uploaded.