How to compress a PDF online
- 1Drop your PDF into the tool above, or click to browse your device.
- 2Pick a compression level: Low, Medium, or High.
- 3Click Compress PDF and download the result. Your file never leaves your browser.
How PDFly compresses your PDF
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.
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.
- What helps instead: shrink the images themselves. Pull the pages out with Extract Images, compress them with Image Compressor, then rebuild the PDF with JPG to PDF. Scanning at 150–200 DPI also keeps files small.
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.