Shrink a PDF’s file size by optimizing its internal structure.
This compresses a PDF by re-writing its internal object structure more efficiently — removing redundant data and using object streams, a more compact way of storing a PDF's internal objects — which reduces file size without touching the visual content.
Be realistic about what this can achieve: this optimizes the PDF's internal structure, not the images embedded within it. Most of a PDF's file size in practice comes from embedded images at full resolution, and genuinely shrinking those requires re-encoding each image at a lower quality — something this lightweight, fully client-side tool doesn't do. For a PDF that's mostly text and vector content, structural compression can meaningfully help; for a PDF full of high-resolution scanned images, the size reduction here will likely be modest.
Compression happens entirely in your browser using pdf-lib. Your file is never uploaded anywhere.
It depends heavily on the PDF’s content. Text-heavy or vector-graphic PDFs often see a real reduction; PDFs dominated by high-resolution embedded images will see only a modest change, since this tool doesn’t re-compress images.
No — embedded images are left as-is. This optimizes the PDF’s internal object structure only, not the images within it.
Re-encoding embedded images at a lower quality is a heavier operation that needs to decode, recompress, and re-embed each image — keeping this tool lightweight and fast meant scoping it to structural compression only.