DEV Community

Cover image for How to Compress a PDF Online for Free: Reduce File Size Without Guesswork
Hovsep Arakelyan
Hovsep Arakelyan

Posted on Edited on

How to Compress a PDF Online for Free: Reduce File Size Without Guesswork

If you're not technical: use the free online tool

If you're not a technical person and you're looking for a free way to make a PDF smaller, use my online PDF compressor. Choose your document, start with Lossless mode, compare the size and download the result. There is no software to install or account to create.

If a scanned document is still too large for an email or upload form, try Smaller scans mode and check that the text remains readable.

If you're technical, I'll also show the command-line approach and explain why different PDFs need different compression strategies.

How to reduce PDF file size

  1. Open the compressor and choose your PDF.
  2. Start with Lossless (preserve text and forms).
  3. Select Apply and compare the result size with the original.
  4. If a scanned PDF is still too large, try Smaller scans (flatten pages).
  5. Adjust resolution and quality, apply again, then download and inspect the result.

For scanned documents, 144 DPI and 70% quality are reasonable starting settings to test. They are not a promise that every document will fit your upload limit.

Check the smallest text, stamps and fine lines before sending the compressed copy.

If you're technical: how it works

If you're technical, you can try a structural rewrite locally with QPDF. With QPDF installed, run:

qpdf input.pdf --object-streams=generate --stream-data=compress --recompress-flate --compression-level=9 output.pdf
Enter fullscreen mode Exit fullscreen mode

This creates a new file using compressed object streams and recompressed Flate data. It does not downsample photos, so compare the output size with the original rather than assuming it will shrink.

My browser tool uses a WebAssembly QPDF workflow for lossless compression. Its Smaller scans mode is a separate rendering pipeline: render each page, encode the result as JPG, and build a PDF from those images.

Those are different operations with different tradeoffs. A structural rewrite can preserve selectable text and form fields; rendering pages to images cannot preserve that interactive structure.

Lossless compression versus smaller scans

Mode What changes Main tradeoff
Lossless The PDF's internal storage is rewritten more efficiently An already optimized file may barely shrink
Smaller scans Each page becomes a JPG image inside a PDF Detail can soften, and selectable text and interactive elements are lost

Lossless mode uses QPDF to rewrite the file structure and recompress data. It does not reduce image resolution, so the document's appearance stays the same.

Smaller scans mode takes a different approach: render each page at your chosen resolution and image quality. This can help with photo-heavy PDFs, but it changes what the document contains.

Why did my PDF barely get smaller?

Compression is not a fixed percentage discount.

If the source app already compressed the document well, there may be little left for a lossless rewrite to remove. A PDF full of compressed images can also remain large because lossless mode does not downsample them.

If the proposed result is not smaller, the tool keeps the original and tells you. You can then decide whether the visual tradeoff of Smaller scans is acceptable.

Can I compress a PDF below 1 MB?

Sometimes, but no setting can guarantee that for every document while preserving readability.

A two-page letter and a 100-page scan have different requirements. Lower DPI and quality gradually, then look at the downloaded file at a useful reading size.

If only a few pages are needed, extracting those pages may solve the problem without degrading the whole document.

Keep the version you can still work with

Compression runs in the browser, so the PDF is not uploaded for processing. Keep your original, especially when flattening pages: the smaller copy will not retain the original's editable or interactive structure.

My rule is simple: start with lossless, measure the result, and sacrifice detail only when the file-size requirement actually calls for it.

Which is usually the bigger problem for you: upload limits or unreadable scans?

Top comments (0)