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.
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.
Open Compress PDF and drop your file onto the page, or click to choose it. You can add up to 10 files at once.
Pick a quality level. Medium Balanced is the default and suits most documents.
Tick Strip author and editor metadata if you also want the title, author and other document properties removed.
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.
| Level | JPEG quality | Shorter side capped at | Good for |
|---|---|---|---|
| Low Quality | 40 | 720 px | Email attachments and on-screen reading where size matters most |
| Medium Balanced (default) | 65 | 1,200 px | Most reports, slide decks and scanned letters |
| High Quality | 85 | 2,000 px | Documents with photos people will zoom into |
| Maximum Quality | 95 | 3,000 px | Light 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.