Shrink a PDF (or a photo of a document) down to an exact KB or MB limit — perfect for exam and job portals with strict upload caps. Nothing ever leaves your browser.
Compress PDF shrinks an existing PDF (or a photo of a document, converted automatically) down to a target file size you choose in kilobytes or megabytes — built for the all-too-common situation where a government exam portal, job application, or visa form caps uploads at something strict like 50KB, 100KB, or 200KB, and the scanned certificate or photo you have is several times that size.
Rather than one fixed "high/medium/low" compression level, you tell it the exact size you need and it searches for settings that hit that number as closely as possible without going over — the same target-driven idea as "compress to fit" features in desktop PDF software, just running entirely in your browser.
Every page of the PDF is rendered to a canvas using pdf.js (the same engine Firefox uses to display PDFs), then re-encoded as a JPEG and reassembled into a brand-new PDF using pdf-lib — this is what actually shrinks the file, since a page full of vector text and fonts becomes a single compressed image instead.
To find the right settings, it runs a binary search on JPEG quality first, always trying the lightest compression (highest quality) before anything heavier — a text-heavy page stays sharp whenever the target size allows it. Only if quality alone can't reach the target even at its lowest setting does it also start lowering the page's render resolution in steps, repeating the quality search at each one, until the result fits under the target or every option has been tried.
All of this — reading the PDF, rendering its pages, compressing, and rebuilding the output — happens inside your browser using pdf.js and pdf-lib. Nothing is ever uploaded to a server, which matters for ID documents, mark sheets, and other sensitive paperwork people run through this tool.
A 1.4MB, 3-page scanned certificate, target 200KB:
No — every step (rendering pages, compressing, and rebuilding the file) happens locally in your browser using pdf.js and pdf-lib. Nothing is ever sent to a server, which is important for ID proofs, certificates, and other sensitive documents.
Yes — drop in a JPG, PNG, or WEBP image and it's automatically wrapped into a one-page PDF first, then compressed the same way as an uploaded PDF.
Every page is converted into a compressed JPEG image to shrink the file, and at very strict targets (well under 100KB on a multi-page document) that can mean lowering both JPEG quality and resolution — the tool warns you when that happens. If your form's limit allows it, pick a slightly larger target for a sharper result.
It gets as close as possible without going over, trying the lightest compression first — but an unusually strict target on a page-heavy or image-heavy PDF may not be reachable at any readable quality, in which case it returns the smallest result it could produce and flags it clearly.
Yes — because every page is flattened into a JPEG image to shrink the file, the output is no longer searchable or selectable the way the original PDF's text might have been. This trade-off is what makes the large size reduction possible.