Tutorials

How to Compress a PDF: Methods for Every Device

What makes a PDF large, what each compression level actually does to the file, and how to shrink one online or offline, with numbers from our own tests.

By Ahtisham ul haq Khan

Founder, PDF Compress

Updated 4 min read
How to Compress a PDF: Methods for Every Device
On this page

A PDF is almost always large because of the images inside it: scanned pages, photos, screenshots. The text itself takes very little space. Compressing a PDF mostly means storing those images at a lower resolution and re-encoding them as JPEG. This guide shows what that does to real files, using test files we ran through our own compressor, and how to do it online or offline.

Why some PDFs are large and others are not

  • Typed text and vector graphics are stored as instructions, not pixels. A page exported from Word or Google Docs is often only a few kilobytes plus its fonts.
  • Scanned pages and photos are pixels. An A4 page scanned at 300 DPI is about 2,480 x 3,508 pixels, close to 9 million. Our one-page test scan was 1.48 MB; five pages were 7.4 MB.
  • Embedded fonts add size. Compressors keep only the characters the document actually uses (font subsetting).

What each compression level does

We compressed three test files at every image resolution our engine uses. File sizes are the real outputs:

Image resolution1-page scan (1.48 MB)5-page scan (7.4 MB)4-page photo PDF (1.86 MB)
240 DPI359 KB1.75 MBunchanged
200 DPI302 KB1.47 MBunchanged
150 DPI (Best Result)189 KB943 KBunchanged
120 DPI119 KB585 KB542 KB
96 DPI97 KB480 KB372 KB
72 DPI (Maximum)62 KB299 KB231 KB
50 DPI32 KB150 KB129 KB

Test files: a certificate scanned at 300 DPI (one page and five pages) and four 3840 x 2400 photos placed at 150 DPI. The photo PDF is "unchanged" at 150 DPI and above because its images were already at 150 DPI.

Two things stand out. Resolution drives size: taking the scan from 300 DPI to 150 DPI cut it from 1.48 MB to 189 KB with no visible difference on screen. And a compressor cannot shrink images below what they already are: the photo PDF only got smaller once the target resolution dropped below its own 150 DPI.

Compress a PDF online

  1. Open the PDF compressor in any browser, on a computer or a phone.
  2. Choose a mode. Best Result resamples images to 150 DPI. Maximum uses 72 DPI. Custom Size tries the levels above and keeps the sharpest one that fits your target.
  3. Upload, wait a few seconds, and download. If a target cannot be reached, the tool says so and gives you the smallest version it could make.

If you already know the limit, the size pages are preset: 100 KB, 200 KB, 300 KB, 400 KB, 500 KB and 1 MB.

Choosing a target size

Use the limit the form or recipient states; limits differ between websites and change over time, so check the upload page rather than a list. From our tests, a rough guide to what fits:

  • About one scanned page per 100 KB at a comfortably readable 96 DPI.
  • Five scanned pages fit in 300 KB at 72 DPI, 500 KB at 96 DPI, or 1 MB at 150 DPI.
  • If a site rejects a file that is just under its limit, it may count 1 KB as 1,000 bytes rather than 1,024. Set a target a few percent lower.

Compress a PDF without uploading it

  • Mac: Preview can do it. Choose File > Export, then pick Reduce File Size from the Quartz Filter menu (Apple's instructions). You cannot choose an exact size. See our Mac guide.
  • Windows, Mac or Linux: Ghostscript, the free open-source engine this site also uses. After installing it, this command resamples images to 150 DPI:
    gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -dNOPAUSE -dBATCH -sOutputFile=small.pdf input.pdf
    On Windows the program is called gswin64c instead of gs. Replace /ebook with /screen for 72 DPI.
  • Adobe Acrobat Pro (paid) also includes a compress tool.

Why some PDFs barely shrink

  • Text-only PDFs are already small; there are no large images to resample.
  • Images already at low resolution are left as they are. Our photo PDF was unchanged in Best Result because its photos were already at 150 DPI; Maximum took it from 1.86 MB to 231 KB.
  • Files that were compressed before have little left to remove, and compressing again mostly costs quality. Start from the original if you have it.

Common questions

Does compression remove or blur the text?

No. Typed text stays as text: it remains sharp, selectable and searchable. Only images are resampled.

Does compression change the page size or layout?

No. Pages keep their size, order and layout.

Can I undo compression?

No. The removed image detail is gone, so keep your original file and send the compressed copy.

Related articles