How to compress a PDF in your browser
Shrink a PDF that's too big to email or upload, choosing between a lossless re-pack that keeps text selectable and an image flatten that gives the biggest savings on scans.
Last updated
Compress shrinks a PDF's file size right in your browser — the file is never uploaded to a server, so nothing about it leaves your device.
Before you start
- Compress is free and doesn't need an account.
- Everything runs locally. Unlike most online compressors, AttachKit never uploads your PDF — you can open your browser's DevTools network tab and watch.
- If the PDF is password-protected (it asks for a password to open), remove the password first with Unlock. PDFs that only restrict editing or printing (an owner password, not an open password) compress fine.
- Decide what matters more: keeping the text selectable, or getting the smallest possible file. That choice is the only setting.
Steps
- Open Compress.
- Drop your PDF onto the drop zone, or click it to pick a file.
- Choose a compression mode (see the table below). Keep text (lossless) is selected by default.
- Click Compress PDF. The work happens in your browser, so a long scanned document can take a little while — the button shows "Compressing…" until it's done.
- Read the result card. If the file got smaller you'll see how much, e.g. "42% smaller" with "8.1 MB → 4.7 MB (saved 3.4 MB)".
- Click Download compressed PDF. The file saves as
yourfile-compressed.pdf— your original is untouched.
| Mode | What it does | Best for | Trade-off |
|---|---|---|---|
| Keep text (lossless) | Re-packs the file's internal structure. | Text-based PDFs with structural bloat. | Savings are modest, and a file that's already well-optimized may not shrink at all. |
| Make it smaller (flatten) | Re-renders each page as a downsampled JPEG (about 120 DPI, longest edge capped at 2200 px) and rebuilds the PDF. | Scans and image-heavy PDFs — this is where the big savings are. | Text is no longer selectable or searchable. |
A few things worth knowing:
- You never get a bigger file. Both modes are size-guarded: if the "compressed" output wouldn't actually be smaller than the input, AttachKit keeps your original bytes and tells you the PDF is "already well-optimized" instead of handing you a larger file labelled smaller.
- Flatten warns you about text. If flattening was actually applied (the re-rendered version won the size check), a notice explains that pages were re-rendered as images and links to Searchable (OCR), which can make the text selectable and searchable again.
- You can experiment freely. After a run, click Try a different mode to re-compress the same file the other way, or Compress another to start over with a new file. Nothing is committed until you download.
Result
You get a smaller copy of your PDF named yourfile-compressed.pdf, created entirely on your device. With Keep text (lossless) the text stays selectable; with Make it smaller (flatten) you trade selectable text for much bigger savings on scans. After downloading, a toast offers a "Fill it →" shortcut that hands the file straight to Fill, and the result screen links to Sign if you need to sign it next.
Related
- Compress troubleshooting — file won't shrink, password errors, lost text
- Unlock — remove a password so the PDF can be compressed
- Searchable (OCR) — restore selectable text after flattening
Related
Still stuck? Contact support →