Compress PDF
Reduce a PDF's file size by re-compressing its pages.
Compression works by re-rendering each page as an image, so this is best for scanned or image-heavy PDFs — text-heavy documents will see a smaller size reduction.
What this tool is for
A PDF full of high-resolution scanned pages or embedded photos can easily reach tens of megabytes, too large for an email attachment or a form's upload limit. This tool reduces a PDF's file size by lowering the resolution of its pages, trading some visual sharpness for a meaningfully smaller file, without desktop PDF software.
It's most useful for scanned documents, photo-heavy reports, or any PDF that's mostly images rather than plain text. If your PDF is already small and mostly text, there may be little room left to shrink, for reasons explained below.
How the compress PDF tool works
Each page of your PDF is rendered to a canvas using pdf.js — the same rendering engine behind Firefox's built-in PDF viewer — then re-saved as a JPEG at a resolution and quality level based on the compression level you choose. pdf-lib then rebuilds a new PDF from those JPEG images. This is a genuinely different process from how a source PDF is normally built: instead of a document made of vector text and graphics, the compressed output is a PDF made of images, one per page.
That distinction matters more than it might sound, and it's the reason such large size reductions are possible on scanned or photo-heavy PDFs — a lower-resolution JPEG can be a small fraction of the size of a high-resolution scan. But it also means the compressed PDF looks the same as your original without necessarily working the same way; see the note below.
Limitations, honestly
This is the trade-off to understand before using this tool: because every page becomes a JPEG image, any selectable or searchable text in your original PDF will not be selectable or searchable in the compressed version — it becomes part of a picture, like a scanned page. Form fields, digital signatures, and any interactive elements also aren't preserved, since the output is rebuilt as flat page images. If you need to keep text searchable, copyable, fillable, or accessible to a screen reader, compressing with this tool isn't the right choice.
Text can also look slightly softer at higher compression levels, since it's rendered as part of a lower-resolution image rather than kept as sharp vector outlines — Light or Recommended preserve it better than Maximum. PDFs that are already mostly small, sharp text have little room left to shrink this way, since their file size comes mostly from the text and structure, not large embedded images.
Frequently asked questions
Will text stay sharp?
Text is re-rendered as part of each page image, so very small text can look slightly softer at Maximum compression — Light or Recommended preserve it better.
Why didn't my file get much smaller?
Already-compressed, mostly-text PDFs have less room to shrink than image-heavy or scanned documents.
Is there a file size limit?
No hard limit, though very large documents take longer to process in the browser.
Will the text still be selectable and searchable after compressing?
No. Every page is converted to a JPEG image during compression, so any text becomes part of that image rather than staying as selectable, searchable text.
Will the compressed PDF still work with a signature or form field?
No — form fields, digital signatures, and any interactive elements aren't preserved, since the output is rebuilt as flat page images.
What compression level should I choose?
Light or Recommended for documents where text needs to stay sharp; Maximum for scans or photo-heavy pages where file size matters more than pixel-perfect detail.