SafetyPDF: Local-First PDF Compression i ...

SafetyPDF: Local-First PDF Compression in Your Browser

Nov 23, 2025

image

SafetyPDF is a small tool I built for people who care about privacy when sharing documents.

Most online PDF compressors upload your file to a remote server. SafetyPDF does the opposite:

  • The compression engine loads as a WebAssembly module inside your browser

  • All parsing, optimization, and output stay in browser memory

  • No document content is sent to my servers – you can even go offline after the engine loads and keep compressing

A typical compression run in SafetyPDF looks like this:

  1. You open a PDF through the browser’s File API – no upload requests are made

  2. The WebAssembly runtime reads and optimizes the file entirely in memory

  3. The compressed PDF is returned as a Blob and downloaded client-side

  4. Temporary buffers and object URLs are cleaned up after the download

For transparency, each load prints a WebAssembly hash to the DevTools console so you can verify which build you’re running. Analytics only record anonymized session counts — never file names or document content.

I built this as a learning project in WebAssembly and local-first design, and it has already been used by a few hundred people. If you try it and find it helpful, I’d love to hear your feedback — and if you feel like it, you can always buy me a coffee here as a tip. ☕

🔗 You can try it here: safetypdf.com

Enjoy this post?

Buy Hiko Chen a coffee

More from Hiko Chen

PrivacyTermsReport