Skip to main content

How to Compress a PDF Without Ruining It

Compress & optimize6 min read

Most PDFs that are “too big” are big for one reason: photos or scanned pages stored at a much higher resolution than anyone needs on screen. Compression works by re-encoding those images. It cannot do much for text, vector drawings or embedded fonts, which are already compact.

This guide explains what each compression level in TokPDF actually does, how to pick one, and what to do when a file refuses to get smaller. TokPDF compresses in your browser with a WebAssembly build of the PyMuPDF engine, so the file is never uploaded. The first run takes a little longer while the engine loads.

Try it now

Opens the tool in your browser. No sign-up needed.

Compress a PDF in four steps

For a single file, the defaults are a sensible starting point. You only need to change the quality level if the result is still too large or the images look worse than you can accept.

  1. Open Compress PDF and drop your file onto the page, or click to choose it. You can add up to 10 files at once.

  2. Pick a quality level. Medium Balanced is the default and suits most documents.

  3. Tick Strip author and editor metadata if you also want the title, author and other document properties removed.

  4. Click compress, check the new size, and download. If the result would be larger than your original, TokPDF tells you the file is already well optimized and gives you the original back.

What each compression level does

The level controls two things: the JPEG quality used when an image is re-encoded, and how far large images are scaled down. Lower quality means a smaller file. Note that the naming describes image quality, not the amount of compression: Low Quality gives the smallest file.

The pixel limit applies to the shorter side of each image. A 4000 × 3000 photo at Medium becomes 1600 × 1200, which is still sharp on a laptop screen and prints acceptably at small sizes.

Image settings per level in TokPDF’s default engine (Condense).
LevelJPEG qualityShorter side capped atGood for
Low Quality40720 pxEmail attachments and on-screen reading where size matters most
Medium Balanced (default)651,200 pxMost reports, slide decks and scanned letters
High Quality852,000 pxDocuments with photos people will zoom into
Maximum Quality953,000 pxLight clean-up when quality must be kept; expect small savings

What happens to your file

Each image is checked before it is touched. Images smaller than 50 pixels or under 10 KB are left alone, and so are images with transparency or a mask, because converting them to JPEG would break how they look. Every other image is re-encoded as JPEG, and the new version is only kept if it is at least 10% smaller than the old one. That rule stops TokPDF from degrading an image for a saving you would never notice.

After the images, the file is rewritten with unused objects removed and its internal streams compressed. Text stays text: you can still select, search and copy it, links keep working, and pages are not turned into pictures.

  • Kept: text, fonts, links, bookmarks, form fields and page layout.
  • Changed: most photos and scans become JPEG at the level’s quality, and very large ones are scaled down.
  • Removed (optional): document metadata such as author, title and creation tool.

Compressing several files: Standard, Condense and Photon

When you add two or more files, TokPDF shows an extra Compression Algorithm choice. Condense is the engine described above and the default. Standard first rewrites the file structure with a different engine (cpdf) and then runs the same image pass on files over 500 KB (except at Maximum Quality). Photon is different in kind: it renders every page as a 150 DPI JPEG and builds a new PDF from those pictures.

Photon can shrink files that nothing else will, such as PDFs full of complex vector artwork. The cost is real: text is no longer selectable or searchable, and links, form fields, comments and bookmarks are gone. Use it for documents that are only meant to be looked at, never for contracts or forms someone needs to fill in. In a batch, the per-file download always gives you the smaller of the original and the result, but the ZIP contains every result as produced, so check sizes before you send the ZIP on.

Why some PDFs will not get smaller

If TokPDF reports that your file is already well optimized, it is usually right. Compression has nothing left to remove in these cases:

  • Text-only documents. A 40-page contract exported from Word is mostly text and fonts, often under 500 KB already. There are no large images to re-encode.
  • Images that are already compressed. Photos saved as reasonably sized JPEGs will not shrink by the 10% needed to be replaced.
  • Black-and-white scans. Scanners often store pages as 1-bit images with very efficient compression. Turning them into JPEG would make them bigger.
  • Embedded fonts. Full Chinese, Japanese or Korean fonts can add several megabytes. TokPDF does not remove or subset fonts, because that can break how text displays.
  • Images with transparency. Logos and cut-out graphics with an alpha channel are skipped by design.

Getting under an email or upload limit

Gmail rejects attachments over 25 MB, and many upload forms set limits of 5 or 10 MB. Work from the least destructive option to the most: compress at Medium; if still too large, try Low; if the file is mostly scans, consider whether colour is needed; and only then reach for Photon in a batch, or split the document into parts.

Remember that compression is a one-way street for images. Keep your original file, and compress a copy for sending.

Privacy and practical limits

Because the work happens on your device, TokPDF sets no file size limit of its own. The practical limit is your device’s memory: a 500 MB scan may compress fine on a desktop and fail on an older phone. If a large file stalls, close other tabs or use a computer.

Password-protected files are handled when you add them: TokPDF asks for the password, unlocks the file in the browser and compresses the unlocked copy. The compressed result is not password-protected, so if you need that, run Protect PDF afterwards. Our guide on password-protecting a PDF explains the options.

Frequently asked questions

Does compressing a PDF reduce text quality?
Not with the default engine. Text and vector graphics are kept as they are and only images are re-encoded. The exception is the Photon algorithm in batch mode, which turns each page into a picture.
Which level gives the smallest file?
Low Quality. The level names describe the image quality you keep, so Low Quality means the strongest compression and Maximum Quality the weakest.
Is “Maximum Quality” lossless?
Not strictly. It still re-encodes eligible images as JPEG at quality 95, which is visually very close to the original but not identical. For a truly untouched copy, keep the original file.
Why did my PDF only shrink by a few percent?
Most of its size is probably text, fonts, already-compressed JPEGs or black-and-white scans, none of which compress much further. See the section on why some PDFs will not get smaller.
Is my file uploaded when I compress it?
No. Compression runs in your browser. TokPDF only records anonymous usage counts such as file size, never the file or its name.

Try it now

Opens the tool in your browser. No sign-up needed.

TokPDF

Professional PDF Tools - Free & Private

Security

  • Secure processingEncrypted connection (HTTPS)
  • No sign-up neededStart using any tool right away

Privacy

Your data is never sold
Free · Secure · No sign-up
Select Language

© 2026 TokPDF. All rights reserved.

Based on the open-source project PDFCraft (AGPL-3.0)PrivacyTerms of Use