Skip to content
comprimirunpdf
100% private and local

About the project

comprimirunpdf is built and maintained by Robert Bzia. It's an independent project, with no company and no investors behind it: a single tool that does a single thing.

Why it exists

Almost every PDF compressor solves the wrong problem. They compress “as much as they can” and hand you back a file of some arbitrary size. But when a form rejects your document, the problem isn't that it's large: it's that it's larger than a specific number —2 MB, 5 MB, 500 KB— and you need to get under it.

That's why this one works the other way round: you set the maximum size and the tool iterates until it gets there. If it can't, it tells you so instead of returning something that won't work either.

Why nothing leaves your browser

The second design decision follows from the first. A PDF compressor receives exactly the documents nobody wants to hand to a stranger: ID cards, payslips, contracts, medical reports. The way not to expose them isn't to promise they'll be deleted from the server within the hour, but to never send them at all.

All processing happens inside the tab, using the power of your own device. That has an unusual and very handy consequence: the tool works offline after the first visit. You can check it yourself, and on the privacy page we explain exactly how.

How it's built

Each page of the PDF is drawn with pdf.js onto an in-memory canvas, encoded as a JPEG image, and the document is reassembled with pdf-lib. The process repeats, lowering resolution and quality until the target is met, and when it's met with room to spare it raises the quality again to get as close as possible to the requested size from below, losing as little as possible.

All of that runs in a Web Worker, a separate thread, which is why the interface keeps responding while a file of tens of megabytes is being compressed.

The trade-off, stated plainly: rasterizing means the text can no longer be selected or searched inside the PDF. If you need to keep it, this tool isn't the right one for your case.

Contact

We're setting up a contact address for questions, bugs and suggestions. Until then, the project's legal information is in the legal notice.

Back to the PDF compressor