Menu
Advertisement

Compress PDF Files Online

Make a PDF smaller by choosing a level, or type the size in KB your form allows. Your file stays on your device.

By Nethanel Bar, Co-founder & CEO

Last updated

Advertisement

Ready to actually learn to code?

Coddy teaches you by writing real code in your browser - interactive lessons, instant feedback, and AI help when you get stuck.

How to make a PDF smaller

Most of the weight of a PDF is its pictures. A scanned page is one big image, and a document with photos carries each one at full resolution. Text, fonts and drawings are tiny by comparison. So the tool works on the pictures: it re-encodes each one as a JPEG at a lower quality and a lower resolution, and removes objects the file no longer uses. Text stays text, so you can still select and search it, and links keep working.

There are two ways to use it. Compression level has three settings, from Light to Strong, for when you just want a smaller file. Target size is for upload limits: pick 50 KB to 2 MB or type any number of KB, and the tool tries gentler steps first. Only if pictures alone cannot reach the size does it redraw every page as a picture, and it tells you when that happened.

Everything runs in your browser, so the PDF is never uploaded to a server. There is no sign-up and no watermark. If the file cannot be made smaller, you get the original back and a note saying so, never a bigger file. For a ready-made page per size, see the shortcuts to 100 KB, 200 KB, 300 KB, 500 KB and 1 MB.

What you will learn while compressing a PDF

  • A PDF is a container. Text, fonts, vector drawings and pictures are separate objects, and the pictures are usually the heavy ones.
  • JPEG is lossy: a lower quality number throws away detail the eye misses, and fewer pixels throw away more. Both trade sharpness for size.
  • Resolution is measured in pixels or dots per inch. A scan at 300 dpi holds four times the pixels of one at 150 dpi, and most forms do not need them.
  • Compression is a loop you can script. Try a setting, measure the output, and go one step further if it is still too big. The Target size mode does exactly that.

How to compress a PDF

  1. Choose your PDF

    Drop the file on the page or use Choose a PDF file. If it needs a password to open, type it when asked. A PDF that only restricts printing or copying opens without one.

  2. Pick how to shrink it

    Compression level gives Light, Recommended and Strong. Target size lets you pick 50 KB, 100 KB, 150 KB, 200 KB, 300 KB, 500 KB, 1 MB or 2 MB, or type your own number of KB.

  3. Press Compress PDF

    The tool shrinks the pictures and shows the size before, the size after and the percent saved, with a preview of the first page. Notes tell you if pages had to be turned into pictures.

  4. Download the result

    Save the new PDF. It has no password and no watermark. Open it and check the pages before you send it anywhere.

Settings quick reference

What each option does to the pictures in your PDF. Text and links are never touched in the level mode.

OptionLongest picture sideBest for
LightUp to 2400 pxDocuments you may print, with a small saving
RecommendedUp to 1800 pxEmail attachments and everyday sharing
StrongUp to 1200 pxScreen reading and strict upload limits
Target size, pictures firstFrom 2400 px down to 620 pxReaching a limit while keeping the text selectable
Target size, pages as pictures150 dpi down to 50 dpiLast resort when pictures alone are not enough
Images under about 12 KBLeft as they areLogos and icons, which would only blur

Compressing a PDF in practice

An email attachment that bounced

Settings

Mode: Compression level Level: Recommended File: brochure with photos, 14 MB

Photos dominate a brochure, so shrinking them to 1800 px at medium JPEG quality saves the most. The text stays sharp and selectable.

A scan for an online form

Settings

Mode: Target size Target: 300 KB File: 3-page scanned letter

A scan is one picture per page, so Target size tries smaller pictures step by step and stops at the first one that fits. Check the result note in case pages were redrawn.

The same job in Python

PyMuPDF
import pymupdf
doc = pymupdf.open("report.pdf")doc.save("report-small.pdf", garbage=4, deflate=True)

This drops unused objects and compresses the file's streams. It does not recompress pictures, which is why scans need the picture steps above.

Common compression mistakes

  • Expecting a text-only PDF to shrink a lot. It is usually small already, and the tool then says so or returns the original.
  • Choosing Strong for a file you will print. Pictures at 1200 px look soft on paper, so use Light or Recommended instead.
  • Not checking the result note. If it says pages were turned into pictures, the text can no longer be selected or searched.
  • Compressing the same file again and again. Each pass recompresses the pictures, and a second pass saves little and costs quality.
  • Deleting your original. Keep it, because shrunk pictures cannot be restored to full quality.

Compress PDF FAQ

Is my PDF uploaded anywhere?

No. The compression runs in your browser, so the file never leaves your device.

Will the text still be selectable?

Yes in Compression level mode, and in Target size mode unless the result note says pages were turned into pictures. Text, fonts and links are not changed by the picture steps.

How do I compress a PDF to a specific size in KB?

Switch to Target size, pick a size or type your own number of KB, and press Compress PDF. The tool tries gentler steps first and tells you if it cannot reach the size.

Why did my PDF barely get smaller?

It probably has few or no pictures, or its pictures are already compressed. Text-only PDFs are small to begin with. Images under about 12 KB are skipped too.

What if the tool cannot reach my target?

You get the smallest version it could make, with a note. Splitting a long document into two files is the usual fix.

Does it add a watermark or need a sign-up?

No. There is no watermark, no account and no limit on how many files you compress.

Can it open a password-protected PDF?

Yes. If a password is needed to open the file, you are asked for it and it stays in your browser. The compressed copy is saved without a password.

Is 1 KB 1,000 or 1,024 bytes here?

1,000 bytes. A file under 200 KB here also fits a form that counts 1 KB as 1,024 bytes.

Can a very large PDF be compressed on a phone?

Files above about 200 MB can run out of memory on a phone. A computer handles big files better.

Other developer tools

Coddy programming languages illustration

Learn to code with Coddy

Get started