compress pdf6 min read

How to Compress a PDF on Linux for Free (2026 Guide)

Compress a PDF on Linux for free, no app or signup. Shrink PDFs in your browser for email, uploads, and sharing — works on Ubuntu, Fedora, and Debian.

SM
Sarah Mitchell

How to Compress a PDF on Linux for Free (2026 Guide)

Linux is brilliant for getting work done, but it has one quiet gap: there is no built-in, one-click PDF compressor. macOS has Preview and Windows has plenty of one-click apps, but on Ubuntu, Fedora, or Debian, shrinking an oversized PDF usually means opening a terminal, installing a package, and remembering a command. That is fine if you love the command line — and a needless detour if you just need a 40 MB scan under a 10 MB upload limit before lunch.

This guide shows the fastest no-install way first: compressing in your browser with PurePDF. It works on any Linux distribution with a modern browser, needs no account, and — unusually — does most of the work on your own machine rather than uploading your file to a server. A terminal alternative is included at the end for readers who prefer it.

Why PDFs get so big on Linux

The usual culprits are the same on every operating system. A scanner set to 300 or 600 dpi produces huge images, screenshots and design exports embed full-resolution pictures, and a report that started life as a Word document can balloon once charts and photos are added. Email providers typically cap attachments at 25 MB, and job portals, government forms, and university uploads often enforce limits as low as 1–2 MB.

Compression fixes this by re-encoding the images inside the PDF at a smarter quality-to-size ratio, downsampling resolution no screen will ever show, and stripping redundant metadata. Text and fonts are left untouched, so a well-compressed PDF looks nearly identical to the original at a fraction of the size.

Compress a PDF on Linux in your browser (no install)

This works on Ubuntu, Fedora, Debian, Arch, and any other distribution running current Firefox or Chrome/Chromium. No Snap, Flatpak, or apt package is involved.

  1. Open https://www.purepdf.net/compress-pdf in your browser.
  2. Drop your PDF onto the page, or click "Choose PDFs" and pick it. You can compress two PDFs at a time without an account, or five at a time with a free account.
  3. Choose a compression level: High Quality for documents that will be printed, Balanced for most everyday files, or Extreme when you must hit a hard limit such as "under 1 MB" for a portal. A custom target lets you aim at an exact size instead of guessing.
  4. Download the compressed file from the download hub. If nothing can shrink your file further, you get your original back rather than a bigger file.

That is the whole workflow. There are no watermarks, no daily limits, and no account required for the free tier — a real difference from tools that cap free users at a couple of tasks a day.

What "browser first" means for your privacy

PurePDF compression runs in your browser first, using a WebAssembly build of Ghostscript — the same engine used in professional print workflows. Most files therefore never leave your device at all. Only when the browser cannot shrink a file is it sent over encrypted HTTPS to a compression service, and it is deleted afterwards. That matters on Linux precisely because many Linux users chose the platform for control over their data: contracts, financial statements, and medical documents stay local unless the fallback is needed.

How much can you shrink a PDF?

It depends on what is inside. Image-heavy PDFs typically shrink 40–90%, and scanned documents compress the most, often 80–90%, because scanner output is heavily over-resolved. Text-only PDFs compress less — sometimes barely at all — because there is simply little left to remove. A realistic rule of thumb: Balanced typically cuts 50–70% with no visible difference on screen, which is the right default for emailing, uploading, and sharing.

Tips for the best result

  • Compress before merging, not after. Smaller inputs make every downstream step faster, and a merged file built from already-compressed pages stays small.
  • Pick the level for the destination, not the smallest number. Extreme is perfect for a hard portal limit, but if the document will be read at high zoom or printed, Balanced or High Quality will look better.
  • If a file barely shrinks, check what it contains. A text-only PDF, or one that was already compressed, has little left to remove. Recompressing the same file again will not help.
  • Unlock password-protected PDFs first. Encrypted files cannot be recompressed until the encryption is removed — PurePDF's unlock tool handles that step.
  • Check the result before you send it. Open the compressed file, skim a photo-heavy page at 100% zoom, and confirm the text is still sharp. If it looks blurry, recompress the original with Balanced instead of Extreme.

The terminal alternative: Ghostscript

If you prefer the command line, Ghostscript is the same engine PurePDF runs in the browser, and it is available in most distributions' repositories. A typical command looks like this:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.6 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed.pdf original.pdf

The /ebook setting gives a good balance of size and quality; /screen goes smaller and /printer or /prepress keeps more quality. The trade-offs are real, though: you need Ghostscript installed, the output can occasionally change fonts or flatten features in complex files, and there is no preview or custom-size slider. For a one-off file, the browser route is faster; for batch-processing hundreds of files in a script, Ghostscript wins.

Other Linux options exist — qpdf and ocrmypdf can help in specific cases, and LibreOffice Draw can re-export a PDF — but none of them is a dedicated, one-click compressor, and Draw in particular can reconstruct a document rather than simply shrinking it. That is exactly the gap the browser method fills.

Compressing PDFs on Linux: frequently asked questions

Do I need to install anything on Ubuntu or Fedora? No. The browser method needs only Firefox or Chrome/Chromium. No package, Snap, or Flatpak is required.

Is it really free? Yes. Two PDFs at a time need no account; a free account raises that to five at a time. There are no watermarks and no daily limits.

Do my files get uploaded to a server? Usually not. Compression runs in your browser first, and most PDFs never leave your device. Only if the browser cannot shrink a file is it sent over encrypted HTTPS and deleted afterwards.

What is the maximum file size? Browser compression is limited only by your device's available memory, so files in the hundreds of megabytes work on a desktop but may struggle on an older machine. The server fallback accepts smaller files.

Can I compress a PDF on a Chromebook running Linux? Yes — and you do not even need the Linux container. The same browser page works in ChromeOS itself, so the steps above apply unchanged.

Why is my compressed PDF still too big for email? Try Extreme, or set a custom target under your provider's limit (for example, under 25 MB for Gmail, or under 1 MB for a strict portal). If the file is mostly text, it may already be near its minimum size.

Bottom line

Linux does not ship a built-in PDF compressor, but it does not need one. Open https://www.purepdf.net/compress-pdf, drop in your file, pick Balanced for everyday use or Extreme for a hard limit, and download the smaller file — no install, no account, and usually no upload at all. Keep Ghostscript in your back pocket for scripted batch work, and use the browser whenever you just need one file smaller, now.

Related: shrink files for upload with the same browser workflow on Windows, Mac, and Chromebook, or pair compression with merging when a multi-document submission needs to arrive as one small file.

Ready to compress pdf?

Use our free online tool to process your files securely in high quality. No sign-up required.

Open compress pdf Tool

Continue Reading