How to compress a PDF without losing quality
· 5 min read
You go to attach a PDF and hit the wall everyone knows: "file too large." Email caps, upload forms, and portals routinely reject anything over a few megabytes — and a scan-heavy PDF blows past that instantly. The fix is compression, but done carelessly it turns crisp text into a blurry mess. Here's how to shrink a PDF meaningfully while keeping it sharp, and how to do it without uploading a sensitive document to a stranger's server.
Why PDFs get so big
Most of the weight in a large PDF comes from one place: images. Specifically —
- Scanned pages, where every page is really a full-resolution photo.
- High-DPI images embedded at far more detail than the screen or printer needs.
- Uncompressed or lightly compressed image data.
The text and vector graphics in a PDF are usually tiny by comparison. That's the key insight behind lossless-feeling compression: shrink the images, leave the text alone.
"Without losing quality" — what that really means
Truly lossless compression (zero visual change) exists but rarely saves much on image-heavy PDFs. What people actually want is visually lossless: a file that looks the same at normal viewing and printing sizes but is dramatically smaller. You get there by:
- Downsampling images to a sensible resolution (150 DPI is plenty for screen and most printing; 300 DPI for high-quality print).
- Re-encoding images at a smart quality level — high enough to avoid visible artefacts, low enough to cut the file size.
- Keeping the text layer as vectors so letters stay razor-sharp and still selectable and searchable.
That last point is what separates a good compressor from a bad one. Cheap tools rasterise the entire page — text and all — into one flattened image, which is why the result looks fuzzy and you can no longer select the words. A good compressor never touches the text.
How to compress a PDF locally, step by step
KeepItLocally's Compress PDF tool runs entirely in your browser — no upload, no server, no account — so even a confidential document stays on your machine.
- Open Compress PDF and drop (or paste) your file.
- Pick a preset. Choose a stronger setting for email/web and a lighter one when you need print quality. The tool shows the resulting size so you can compare.
- Compress and download. Text stays selectable; only the images are optimised.
A quick sanity check afterwards: open the compressed file and try to select a line of text. If the cursor highlights actual words, the text layer survived — exactly what you want.
Getting under a specific size limit
If a form demands "under 5 MB," start with a stronger preset and step down only if the file looks soft when zoomed in. For scanned documents that are still too big, converting to grayscale can cut size further — see Grayscale PDF. And if your PDF is a stack of photos, resizing the source images before assembly (with the image converter) often beats compressing afterwards.
Why do it offline?
The documents people most need to compress — contracts, tax forms, passports, medical records — are exactly the ones you'd least want on an unknown server. Doing it locally sidesteps the whole question: there's no upload to worry about, no retention policy to trust, and it works with your internet disconnected. Open DevTools → Network while you compress and you'll see zero requests carrying your file.