How to compress a PDF online
- Drop your PDF into the tool above, or click to browse your device.
- Pick a compression level — Low, Medium, or High.
- Click "Compress PDF" and download the result. Nothing is uploaded; the file is compressed inside your browser.
How PDFly compresses your PDF
A PDF's file size comes from two very different places: the document's internal structure (its object table, fonts, form fields, and metadata) and the images embedded inside it. Shrinking either one counts as "compression," but the techniques are unrelated.
PDFly's Compress PDF tool runs entirely in your browser using the pdf-lib library. When you compress a file, it rebuilds the PDF's internal object table, removes duplicate objects and leftover data from previous edits, and — on Medium and High — rewrites that table using compressed object streams, a more compact format introduced in PDF 1.5. This whole process is lossless: it doesn't touch a single pixel in your images or re-encode a single embedded font, so there's no quality to lose.
In plain terms: PDFly's compressor does not currently re-encode, downsample, or recompress embedded images — the technique that does the most for scanned pages and photo-heavy PDFs. For that, use PDFly's Image Compressor on the images themselves, or the workflow described below.
Lossless vs. lossy compression
Lossless compression reorganizes data more efficiently without discarding anything — what PDFly's tool does. Lossy compression discards detail to save more space, typically by re-encoding a JPEG at a lower quality setting or reducing its pixel dimensions (downsampling) — something desktop PDF editors like Acrobat can do, but which PDFly's in-browser engine doesn't perform today. If a PDF's size is dominated by its images, lossless structural compression alone will only get you so far.
Choosing a compression level
- Low: skips the object-stream rebuild, keeping the older, more universally compatible cross-reference format — useful if the file needs to open in a very old PDF reader.
- Medium: the recommended default. Rebuilds the file with compressed object streams for a smaller, still fully compatible PDF.
- High: currently applies the same structural rebuild as Medium. It's PDFly's strongest available setting today, and the level we'll extend first as image-aware compression is added to the engine.
Why some PDFs barely shrink
- Scanned pages: the file is almost entirely embedded page images, which structural compression doesn't touch.
- Already-optimized PDFs: files previously saved with "optimize" or "reduce size" in another tool have little redundant structure left to remove.
- Encrypted or password-protected PDFs: the object table can't always be rebuilt cleanly — see Troubleshooting below.
- Mostly-text or mostly-vector PDFs: these are usually small to begin with, so there's less to gain in absolute terms even when the percentage looks decent.
Scanned documents and photo-heavy PDFs
If a scanned PDF needs to be smaller, the real lever is the images, not the wrapper around them. Two workflows actually move the needle: scan at a lower resolution in the first place (150–200 DPI is plenty for on-screen reading; save 300 DPI for documents that will be printed), or, for a PDF you already have, pull the pages out with Extract Images, shrink them with Image Compressor, and rebuild the PDF with JPG to PDF. If you also need the text searchable, run OCR PDF before or after.
Before you compress: quick wins
- Remove Pages: drop pages you don't need with Remove Pages before compressing — fewer pages is a bigger win than any compression setting.
- Organize PDF: reorder or delete pages in one pass with Organize PDF.
- Flatten PDF: on heavily annotated or form-filled documents, Flatten PDF can reduce stored object overhead.
- Merge once: if you're combining files with Merge PDF, compress the sources first rather than merging repeatedly and compressing at the end.
Common mistakes
- Expecting a scanned or photo-heavy PDF to shrink dramatically from structural compression alone.
- Compressing before trimming pages you don't need — compress last, once the file only contains what you're keeping.
- Running the compressor repeatedly on the same file hoping for extra savings each pass — once the object table is rebuilt, there's nothing left to rebuild.
- Deleting the original before checking that the compressed file opens correctly, especially for PDFs with forms or complex layouts.
Troubleshooting
- Password-protected PDF: remove the password first with Unlock PDF. Compressing an encrypted file directly can produce a corrupted result.
- File won't open after compressing: try Repair PDF on the original first, then compress the repaired version.
- Result says "Optimized" instead of a percentage: that means the reduction was under 1% — normal for a file that was already efficiently structured.
- Large files are slow or the tab freezes: everything happens in your device's memory, so files of several hundred MB can be slow on phones or older computers. A desktop browser handles large PDFs more comfortably.