Lightfold Compress a PDF

An open-source PDF compressor you can trust

Lightfold is free and open source. The code is public, so anyone can check that PDFs are processed only on your device and never uploaded.

View the source code on GitHub →

What's under the hood

How it compresses without wrecking quality

  1. Lossless clean-up: removes duplicate and unused objects, strips bloated encodings and packs the file structure.
  2. Measures every image: checks the resolution each image is actually displayed at on the page.
  3. Resizes only oversized images: photos are re-encoded as JPEG, and screenshots and UI graphics stay lossless so their text stays crisp.
  4. Leaves print-critical images alone: CMYK and spot-colour images aren't touched.
  5. Verifies the result: confirms page count, text, links and bookmarks survived, and returns the original if compression wouldn't help.

Why open source matters for a PDF tool

Privacy policies are promises. Open code is proof. Because Lightfold's source is public, developers, security teams and IT departments can audit exactly what happens to a file, and even host their own copy internally.

FAQ

Is there a free open-source alternative to paid PDF compressors?

Yes. Lightfold is free, open source (AGPL-3.0) and runs in any modern browser with no account or limits.

Can I self-host Lightfold?

Yes. It's a static site: build it with npm and serve the output folder from any static host. The AGPL licence requires that you share your changes if you run a modified version publicly.

What engine does it use?

MuPDF by Artifex, compiled to WebAssembly, with Lightfold's own image-analysis and quality logic on top.

Try it now. Your file stays on your device.

Compress a PDF, free