Your files never leave your device. All processing happens locally in your browser.
How do I compress a PDF to email it so it clears Gmail, Outlook and other attachment limits — without uploading the file?
Open Compress PDF for Email and drop your PDF onto the page — the target is already locked to a safe, universal email size of 10 MB (10240 KB), so there is nothing to configure. The tool renders every page in your browser with Mozilla’s pdf.js, re-encodes the embedded images at a lower resolution and JPEG quality only as far as needed, and rebuilds the document with pdf-lib, aiming to land at or just under 10 MB. 10 MB is chosen deliberately: providers quote generous headline numbers — Gmail and Yahoo Mail 25 MB, Outlook.com 20 MB — but those are total-message sizes, and email base64-encodes every attachment on the wire, inflating it by roughly a third, so the real attachment budget is smaller (around 18 MB on Gmail, about 14 MB on Outlook, and as little as 7–10 MB on many corporate Exchange servers). A PDF at or under 10 MB clears virtually every mail system even after that encoding overhead, so it sends first time instead of bouncing with a “message too large” error. It produces three quality variants in one pass — Best Quality, Balanced and Smallest — and marks each with a check when it meets the 10 MB cap, then shows the before/after sizes and the exact percentage saved. Most reports, contracts and slide decks drop under 10 MB while keeping their text selectable; only a very large, image-heavy scan is squeezed hard, and if 10 MB genuinely cannot be reached the tool reports the smallest size it achieved rather than returning an unreadable file. Everything runs in the tab, so nothing is uploaded and your PDF never leaves your device; the result downloads as your file name with a -compressed.pdf suffix, ready to attach.
Target locked to a safe, universal email size of 10 MB (10240 KB) — drop a PDF and it compresses to fit, with no settings to pick
Clears Gmail (25 MB), Yahoo Mail (25 MB) and Outlook.com (20 MB) with room to spare, plus the far tighter 7–10 MB caps common on corporate mail servers
Accounts for the roughly one-third base64 encoding overhead that inflates every email attachment on the wire, so a 10 MB PDF still sends first time
Three quality variants in one pass (Best Quality, Balanced, Smallest), each tagged with a check when it lands under 10 MB, with text kept selectable where possible
Runs entirely in the browser with pdf.js and pdf-lib — no upload, no install, no account — and the result downloads ready to attach
What is
Compress PDF for Email
Compressing a PDF for email means reducing the document’s file size until it fits comfortably within an email service’s attachment limit — and stays under it even after the roughly one-third size increase that base64 encoding adds to every attachment on the wire. The headline limits are more generous than they behave: Gmail and Yahoo Mail state 25 megabytes and Outlook.com 20 MB, but those figures cover the whole message, and because binary attachments are base64-encoded for transport a file grows by about 33% before it is sent — so the effective attachment budget is nearer 18 MB on Gmail, about 14 MB on Outlook, and as little as 7–10 MB on many corporate Exchange servers. A safe, universal target is therefore around 10 MB, which clears virtually every mail system with margin to spare. Because most of a PDF’s weight is usually its images and scanned pages, a compressor reaches such a target mainly by down-sampling those images to a lower resolution (DPI) and re-encoding them with lossy JPEG compression; stripping metadata and, when needed, converting pages to grayscale free up further bytes, while vector text and fonts stay untouched where possible. This tool locks the target to 10 MB, renders the pages with Mozilla’s pdf.js and rebuilds the file with pdf-lib entirely on your device, so no cloud service is involved and the PDF is never uploaded — the compressed file downloads ready to attach.
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 the invoices, contracts, scans and private paperwork you are shrinking to email 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.
Aim for about 10 MB or less. Gmail and Yahoo allow 25 MB and Outlook 20 MB, but base64 encoding adds roughly a third in transit and many corporate servers cap far lower, so 10 MB sends reliably everywhere.
The headline limits — 25 MB on Gmail and Yahoo Mail, 20 MB on Outlook.com — sound generous, but they describe the whole message and email base64-encodes every attachment on the wire, inflating it by roughly 33%. That drops the real attachment budget to around 18 MB on Gmail, about 14 MB on Outlook, and as little as 7–10 MB on many corporate Exchange servers. A PDF at or under 10 MB clears all of those even after encoding, which is why this tool locks the target to 10 MB: it is small enough to send first time from almost any account yet roomy enough to keep quality high. If your recipient uses a strict corporate mailbox you can compress further with the 5 MB, 2 MB or KB presets; if you only ever send from a personal Gmail account, the 20 MB or 25 MB presets are one click away.
At a 10 MB target the loss is usually minimal — most documents keep their text selectable and scans stay crisp, and a file already under 10 MB is barely touched.
Reaching a size target uses lossy compression — images are down-sampled to a lower DPI and re-encoded as JPEG — but 10 MB is a comfortable budget for the kinds of files people email, so the tool rarely has to push hard. A typical report, contract or slide deck lands under 10 MB with no visible change and keeps its text live and searchable, and a document already under 10 MB is left almost as-is. Three variants are generated in one pass (Best Quality, Balanced and Smallest) and the tool defaults to the best one that still fits. Only a very large, high-resolution scan running to many tens of megabytes is compressed firmly enough that fine detail softens, and if the tool must rebuild those pages as JPEG images to reach 10 MB the text on them becomes part of the picture; even then the result stays legible, and you can pick the Best Quality variant for maximum fidelity.
Yes. It runs entirely in your browser on any modern phone, tablet or computer, and works offline once the page has been cached — no app or install needed.
The tool is 100% client-side, so it works in any modern browser on Android, iPhone, iPad, Windows, macOS or Linux without installing anything — handy when you need to shrink a PDF and attach it straight from your phone’s mail app. Because the compression happens on your own device with pdf.js and pdf-lib, it keeps working offline once the page has loaded once. One PDF is processed at a time and the practical size ceiling is your device’s memory, so a very large scan is bounded by available RAM; on a phone, extremely heavy files may compress more slowly, but because 10 MB is a realistic email target most documents reach it quickly and stay entirely on the device.
Detailed Explanation
📖How It Works
Compressing a PDF to Email — Entirely in the Browser
Compress PDF for Email shrinks a document to a safe, universal email attachment size without uploading a single byte. The target — 10 MB (10240 KB) — is read from the page URL and locked, so there is nothing to choose: drop your PDF and the tool goes to work. It renders every page in the browser with Mozilla’s pdf.js, re-encodes the embedded images at a lower resolution and JPEG quality only as far as needed, and rebuilds the file with pdf-lib inside a Web Worker, aiming to land at or just under 10 MB. Three quality variants are produced in a single pass — Best Quality, Balanced and Smallest — each tagged with a check when it clears the cap, alongside the original versus new size and the exact percentage saved. 10 MB is picked so the file sends first time from almost any mailbox: even after the roughly one-third size increase that base64 encoding adds to attachments in transit, a 10 MB PDF stays well under Gmail’s and Yahoo’s 25 MB, Outlook.com’s 20 MB, and the far tighter 7–10 MB ceilings common on corporate mail servers. Most reports, contracts and slide decks drop under 10 MB while keeping their text selectable; only a very large, image-heavy scan is squeezed hard, and if 10 MB is genuinely out of reach the tool reports the smallest size it achieved rather than producing an unreadable file. Everything runs on your device, so the PDF never leaves the tab, and the result downloads ready to attach.
Targets a 10 MB (10240 KB) email-safe ceiling read from the URL and locked — no settings to configure
Renders pages with pdf.js and rebuilds with pdf-lib in a Web Worker — no upload
Three variants (Best / Balanced / Smallest) with live sizes and a target-met check
10 MB clears Gmail, Yahoo, Outlook and corporate servers even after base64 encoding overhead
📋Use Cases
Why 10 MB Is the Right Size to Email a PDF
The single most common reason a PDF will not email is that it is over the recipient’s attachment limit — and those limits are lower in practice than the numbers providers advertise. Gmail and Yahoo Mail quote 25 MB and Outlook.com 20 MB, but each figure is the total message size, and email base64-encodes binary attachments for transport, which inflates them by roughly 33%. That drops the real attachment budget to around 18 MB on Gmail, about 14 MB on Outlook, and as little as 7–10 MB on many corporate Exchange mailboxes, which is where cross-company email most often bounces with a “message too large” error. Compressing to 10 MB sidesteps all of that: it is small enough to send from virtually any account after encoding, yet roomy enough to keep quality high for the reports, contracts, invoices, resumes and scanned forms people actually attach. Instead of falling back to a Google Drive or OneDrive share link — which forces the recipient to click out, sign in or request access — the PDF travels as a normal attachment that lands straight in the inbox. If a recipient runs a strict corporate mailbox you can compress further with the 5 MB, 2 MB or KB presets; if you only ever send from a personal Gmail account, the 20 MB or 25 MB presets are one click away.
Advertised limits (Gmail/Yahoo 25 MB, Outlook 20 MB) are total-message sizes, not clean attachment budgets
Base64 encoding inflates attachments by about a third, dropping the real budget to ~18 MB (Gmail), ~14 MB (Outlook), 7–10 MB (corporate)
10 MB sends first time from almost any mailbox — no Drive/OneDrive share link needed
Sibling presets cover 5 MB, 2 MB and smaller for strict mailboxes, and 20 MB / 25 MB for generous ones
🔧Technical Details
How the Email Target Is Reached
When the page loads at /compress-pdf-for-email, the route’s URL parser (getPdfPresetFromPath) matches the path against a small table of named presets, finds the email entry and fixes the target at 10240 KB (10 MB) with the title “Compress PDF for Email”, showing a locked-target banner (“Target: 10 MB”) instead of the usual preset grid. On drop, the PDF is read into an ArrayBuffer with the File API and pdf.js (pdfjs-dist) renders a first-page thumbnail and the page count, its worker bundled with the app locally rather than fetched from a CDN. Smart Compress hands the buffer and options { targetKB: 10240, grayscale, removeMetadata } to the smartCompressPDF routine (src/lib/workerClient.ts), which pursues two strategies and keeps whichever yields the smaller file that still meets 10 MB: it re-encodes the PDF’s embedded images at reduced JPEG quality and scale, and, when a target needs it, rasterises whole pages by having pdf.js paint each page onto an HTML canvas at a chosen DPI, encoding the canvas as JPEG and assembling a fresh PDF 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) — and metadata is stripped by default. Each variant is measured, tagged when it lands under 10 MB, and the chosen one downloads from a local Blob with a -compressed.pdf suffix, ready to attach.
getPdfPresetFromPath matches the named email preset and locks the target at 10240 KB (10 MB)
pdf.js (pdfjs-dist) reads the page count and renders the thumbnail; its worker is bundled locally, not from a CDN
smartCompressPDF re-encodes images and, when needed, rasterises pages via canvas, rebuilding with pdf-lib
Three variants generated and measured in one pass; the chosen file downloads from a local Blob
⚠️Limitations
Honest Limitations
Whether 10 MB is reachable depends on the content, but for the kinds of files people email it usually is — and a file already under 10 MB needs no real compression at all. An ordinary report, contract, invoice, resume or short scan sits under 10 MB comfortably and stays crisp; only a very large, photo-heavy file — a long, high-resolution scan running to many tens of megabytes — has a physical floor, and past a point the tool stops at the smallest legible size it can produce and surfaces a warning naming that figure rather than returning junk. The savings come from lossy compression, so there is a genuine trade-off when the tool must rebuild pages as JPEG images to hit the target: the text on those pages becomes part of the picture and is no longer selectable or searchable. The 10 MB figure is also a deliberately conservative, universal choice rather than a per-provider maximum — a personal Gmail account can take much more, while a strict corporate mailbox may cap even lower, so if you know the exact limit a tighter (5 MB, 2 MB) or looser (20 MB, 25 MB) preset may suit better. 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, auto-dismissing error instead of a broken result. If a huge scan will not fit even 10 MB, enabling grayscale, removing spare pages or splitting the document first usually gets you under the cap.
Most emailed documents reach 10 MB easily; a file already under 10 MB needs no real compression
Only a huge photo-heavy scan may bottom out above 10 MB, and the smallest achieved size is reported with a warning
10 MB is a conservative universal target — personal accounts allow more, some corporate mailboxes less
In-browser processing bounded by device RAM; one PDF at a time; password-protected or corrupt files report a clear error
🔒Privacy & Security
Privacy: Your PDF Never Leaves the Tab
The documents people compress to email are often the sensitive kind — contracts, financial statements, signed forms, invoices, scanned IDs, resumes — 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 inside a Web Worker 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, ready to attach in your mail app. 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 — a meaningful contrast with cloud compressors that require you to upload the very attachment you were trying to keep private.
PDF read, rendered and rebuilt entirely in the browser; nothing uploaded
No server, upload, database, API or CDN in the processing path; pdf.js worker bundled locally
Compressed PDF built on-device in a Web Worker and downloaded from a local Blob; works offline once cached
No login or telemetry; closing the tab discards everything
Compress PDF for Email — target, quality and limits
Capability
Support
Notes
Target size
Locked at 10 MB (10240 KB)
A safe, universal email size read from the URL; a banner replaces the preset grid so there is nothing to configure
Quality variants
Best, Balanced, Smallest
Three generated in one pass; each tagged with a check when it lands at or under 10 MB
Method
Image re-encode + page rasterise
pdf.js renders pages, images are down-sampled and JPEG-re-encoded, and pdf-lib rebuilds the file
Fidelity
Comfortable budget, so near-lossless for most files
Most documents meet the cap without rasterising pages, keeping text selectable; files already under 10 MB barely change
Best for
Emailing a PDF that keeps bouncing
Clears Gmail (25 MB), Yahoo (25 MB), Outlook (20 MB) and 7–10 MB corporate caps even after ~33% base64 overhead
Privacy & scale
In-browser, bounded by RAM
Compressed with pdf-lib in a Web Worker on-device, one PDF at a time; 100% client-side, no upload
Compress PDF for Email locks the target at 10 MB / 10240 KB (a safe, universal email attachment size read from the URL) and rebuilds the document in the browser: pdf.js renders the pages, images are down-sampled and JPEG-re-encoded, and pdf-lib assembles the result inside a Web Worker, producing three variants (Best, Balanced, Smallest) each marked when it clears 10 MB. 10 MB is chosen because email base64-encodes attachments and inflates them by roughly a third, so the real budget behind the advertised limits (Gmail/Yahoo 25 MB, Outlook 20 MB) is nearer 18 MB, 14 MB or as little as 7–10 MB on corporate servers — a 10 MB PDF clears them all and sends first time. Most documents meet the cap without rasterising pages, keeping text selectable, and a file already under 10 MB barely changes; only a huge photo-heavy scan stops at the smallest legible size with a warning. Reaching the target is lossy, so any rasterised pages lose selectable text. Everything runs on-device; nothing is uploaded.