Compress PDF
Choose a PDF, pick a compression level, and get back a smaller file with the real before/after size shown. Nothing you upload ever leaves your browser.
How compression works without a server
This tool chains together the two PDF libraries used elsewhere
on this hub. First, pdfjs-dist — the same PDF.js
engine that powers the PDF to JPG tool — renders each page onto
an in-page <canvas> at a scale set by your
chosen compression level, and canvas.toBlob()
captures that as a JPEG at a matching quality setting. Then pdf-lib takes over: it creates a brand-new PDF
document, embeds each rendered JPEG with embedJpg(), and draws it as a full page — sized to
the original page's real point dimensions, not the
pixel dimensions of the raster image, so the compressed PDF
looks and prints at the same physical size as the source.
Worked example
Take a standard US Letter page — 612 × 792 PDF points (8.5″ × 11″). At Medium (1.3× scale) this tool renders it to a 796 × 1030 pixel canvas before re-encoding it as JPEG at 70% quality; the new PDF page is still sized 612 × 792 points, so it displays and prints identically — it's just built from a compressed image instead of the original content. Low (1.0× scale) renders the same page at exactly 612 × 792 pixels with 50% quality for a smaller, visibly softer result; High (1.8× scale) renders it at 1102 × 1426 pixels with 85% quality for a crisper but larger file. For a scanned, image-heavy PDF, Medium alone typically cuts total file size by somewhere in the 70–90% range, since JPEG re-encoding is usually far more space-efficient than a scanner's original output.
Frequently asked questions
Is my PDF uploaded anywhere?
No. Every step happens locally: pdfjs-dist renders each page onto an in-page canvas, and pdf-lib rebuilds the compressed PDF from those rendered pages — both running entirely in your browser tab. Nothing is sent to a server.
Will the text in my PDF still be selectable after compressing?
No, and it's important to be upfront about that: this tool works by re-rendering each page as a JPEG image and embedding that image as a full page in a new PDF. Whatever text was in the original — even real, selectable text — becomes part of a picture, so it's no longer selectable, searchable, or copyable in the output. This tool is a good fit for scanned documents or PDFs you just need to shrink for sharing. If you need to keep selectable text, this isn't the right tool — look for one that compresses fonts and images without rasterizing pages.
What's the difference between Low, Medium, and High quality?
Each level controls two things together: the resolution pages are rendered at before compression, and the JPEG quality they're saved with. Low renders at 1.0× scale with 50% JPEG quality for the smallest file and the most visible softening. Medium (the default) renders at 1.3× scale with 70% quality, a balance that suits most documents. High renders at 1.8× scale with 85% quality, keeping more fine detail at the cost of a larger file.
What kind of PDFs shrink the most — and could this ever make a file bigger?
Scanned pages, photos, and image-heavy PDFs typically shrink the most, often dramatically, because JPEG re-encoding is far more space-efficient than how scanners and cameras usually save images. A short, mostly-text PDF is the opposite case: its original vector text is already extremely compact, so turning each page into a JPEG image can sometimes produce a similar-sized or even slightly larger file. The before/after sizes shown after compressing are the real numbers for your file, not an estimate, so you'll always see exactly what happened.