Alright so this started because I was trying to email a PDF and it was too big.
I did what everyone does — Googled "compress PDF online." Clicked the first site. And then spent the next 15 minutes dealing with signup walls, file size limits, and sketchy privacy practices.
Tried another site. Same thing. And another. Same thing.
At some point I just thought — why is this so hard? It's literally just making a file smaller. Why does every tool need my email address for that?
So I built my own thing.
What I made
It's called CompressPDF. It compresses files — PDFs, images, videos, and a bunch of other formats.
The main thing I wanted to get right was privacy. If your file is under 10MB, it gets compressed right in your browser using WebAssembly. It literally never gets uploaded anywhere. No network request. Nothing leaves your machine.
For bigger files it does go through the server, but everything gets auto-deleted after an hour.
No signup. No limits. No ads. I know every tool says this but I actually mean it — there's no premium tier hiding behind a paywall.
Tech stuff
I used Next.js with TypeScript for the frontend. Nothing crazy there.
The interesting part is the WebAssembly compression. When someone drops a small file, the browser reads it, WASM compresses it, and the user downloads the result. The whole thing happens locally.
I went back and forth on this for a while. Considered just doing everything server-side because it's simpler, but that defeats the whole privacy point. Pure JS compression was too slow. WASM ended up being the sweet spot — fast enough and runs entirely client-side.
Hosting is on Railway which has been great honestly. Push to git and it deploys. No messing around with server configs.
Other tools I added
Beyond compression I built a few PDF tools that I personally needed:
- Merge multiple PDFs into one
- Split out specific pages
- Rotate pages (for those annoying sideways scans)
- Convert images to PDF
Each one is at /tools/merge, /tools/split, etc. Next.js file-based routing made this pretty clean to organize.
Things that were harder than expected
Handling different file types** was probably the biggest headache. Images need quality-based lossy compression. PDFs need structure-aware compression so the text stays sharp. Videos use codec-based compression. Archives are already compressed so there's not much you can do.
Building one UI that handles all of these differently under the hood took way more work than I expected.
Browser memory was another thing. When you're processing files client-side you're working within the browser's memory limits. Had to implement chunked processing and make sure I was cleaning up properly or the tab would just crash on larger files.
The 10MB threshold** — deciding when to compress in browser vs sending to server. Sounds simple but getting the detection and routing smooth without the user noticing the switch took some effort.
What I'd tell other devs
WebAssembly is legit. I was skeptical about using it in something user-facing but it works well in all modern browsers and the performance is solid. If you're building anything that does heavy processing in the browser, worth looking into.
Also — ship early. I kept wanting to add "just one more thing" before launching. Glad I didn't wait. Getting real feedback from actual users is way more valuable than guessing what features people want.
What's next
Some stuff I'm planning:
- Batch compression (drag in 20 files at once)
- Chrome extension
- API for developers
- More video formats
- Maybe a desktop app with Tauri
Check it out
Here's the link: compresspdf.up.railway.app(https://compresspdf.up.railway.app/)**
Would genuinely love feedback. What would you change? What formats do you need? Anything broken?
Let me know in the comments or hit me up on Twitter.
Top comments (0)