Where a PDF's size comes from
In most large PDFs almost all the bytes are pictures: scanned pages, phone photos, screenshots. Text and vector drawings take very little space. So this tool goes after the pictures: each one is scaled down to a sensible resolution and saved again as a JPEG at a lower quality, while text, fonts and drawings are left exactly as they were.
Pick a level:
- Light keeps photos up to 2400 pixels on their long side at high quality, for print.
- Recommended (1800 px) suits screen reading and most upload forms.
- Strong (1200 px, lower quality) gives the smallest file, still readable on screen.
A picture is only replaced when the new version is clearly smaller, and if the whole file doesn't get smaller you get the original back. You can compress up to five PDFs at a time.
Nothing is uploaded
Your PDF is processed by your own browser, so confidential documents never reach a server and there is no daily limit.
How this works
The PDF is opened in a Web Worker with pdf-lib. Every JPEG image and every uncompressed-colour RGB or greyscale image is decoded by the browser, resized on a canvas and encoded as JPEG at the chosen quality (0.80, 0.65 or 0.50). The smaller version replaces the original inside the PDF; images with transparency masks, CMYK colour or special encodings are kept as they are. The document is then saved with compressed object streams.
Frequently asked
Will my text get blurry?
No. Only images are re-compressed. Text and vector drawings are copied unchanged, so they stay sharp at any zoom.
Why didn't my PDF get smaller?
It probably has few or no photos, or they were already compressed. Text-only PDFs are small already; the tool then returns your original file.
Is my PDF uploaded?
No. Compression runs in your browser on this device; nothing is sent to a server.
Which level should I choose?
Recommended works for email and most upload forms. Use Strong when a site has a tight size limit, and Light when you plan to print.
Sources
- ISO 32000-2:2020 — Document management — Portable document format — Part 2: PDF 2.0
- @cantoo/pdf-lib — create and modify PDF documents in any JavaScript environment
- ITU-T T.81 — Digital compression and coding of continuous-tone still images (JPEG)
- HTML Standard — OffscreenCanvas convertToBlob()
Reviewed Oct 19, 2026 · test vectors fixtures/tools/pdf/compress-pdf/