I Built 400+ Tools That Never See Your Files โ€” the Wasm and ONNX Version

PDFs merged with qpdf compiled to WebAssembly, a segmentation model running in the tab, and a Safari crash that taught me more than the happy path did. No uploads, no accounts, no server doing the work.

William Sun (Open-Source)7 min read0 kali dilihat
I Built 400+ Tools That Never See Your Files โ€” the Wasm and ONNX Version

Every tool site wants your file first.

Upload the PDF. Upload the photo. Wait for the spinner. Maybe make an account, because of course. Then a server somewhere does about thirty seconds of work on a document you didn't really want living on someone else's disk.

I kept asking a dumb question: how much of that upload is actually necessary? Not "nice to skip." Necessary.

So I gave myself one rule for Verystep, the tool site I run, and I've held it through 431 English tools now:

If a tool needs your file to touch my server, it doesn't ship.

This is the engineering version of that story. Less philosophy, more "here's what broke."

The two tools everyone assumes need a server

People accept that a unit converter can run in a page. They don't believe it about PDFs, and they really don't believe it about AI background removal. Fair. Those were the two I had to prove first.

PDF work runs on qpdf, compiled to WebAssembly. qpdf is a serious C++ library, older than most of the startups in this space. It parses, restructures and encrypts PDFs properly โ€” it's not a JavaScript toy pretending. Compiled to Wasm and loaded into the page, it does the whole job in the tab. Your file becomes an ArrayBuffer, the engine works on it in memory, and the result comes back as a download:

const bytes = new Uint8Array(await file.arrayBuffer());
// ... hand bytes to the Wasm engine, get modified bytes back ...
const url = URL.createObjectURL(
  new Blob([outBytes], { type: "application/pdf" })
);
downloadLink.href = url; // nothing crossed the network

Merge, split, protect, unlock โ€” same pattern. At no point is there a request carrying your document anywhere, mostly because there is no code in the page that could make one.

Background removal runs a real segmentation model in the browser. That's BiRefNet, running through ONNX Runtime Web. The honest cost hits on first load: the model itself is a big download, and you wait for it in a way a server tool wouldn't make you wait. After that, though, your photo stays put. A portrait of your kid does not go to a server farm so an algorithm can find the edges of their hair.

That trade โ€” a slow first load in exchange for never sending the file โ€” is the whole product, really. Everything else is details.

The Safari crash that rewrote my assumptions

Here's the part I'd rather skip, which is exactly why it belongs here.

The background remover worked on desktop Chrome. It worked on Edge. Then iPhones started dying. Not an error message. Not a caught exception I could log. Safari just showed "A problem occurred repeatedly" and reloaded, because the WebContent process itself had crashed.

The culprit was the WebGPU execution provider in the JSEP build of ONNX Runtime Web. Creating a session with it hard-crashes WebKit. No JavaScript exception fires, so every neat try/catch fallback I'd written sat there doing nothing while the tab died around it.

The fix, once I finally pinned it down:

  • Detect WebKit/iOS up front โ€” AppleWebKit in the user agent, minus Chrome, Edge, Opera and Firefox, plus any iOS device.
  • On those browsers, load the basic Wasm bundle instead of the JSEP build, and use the wasm execution provider only. One thread.
  • Cap the result canvas. iOS Safari has a hard canvas limit, so I hold the long edge to 4,096 px and the total area to 16,777,216 px. Before that cap, a 48MP photo was building a canvas of roughly 200 MB. On a phone. Yeah.
  • Free the model buffer after the session is created, instead of holding tens of megabytes the page no longer needs.

And one more thing, learned the hard way: the model input is fixed at [1, 3, 1024, 1024]. There's no "lighter mode for phones" without re-exporting and re-validating the model. Pretending otherwise would have shipped a worse tool with a confident label on it.

Lesson I'd hand to anyone shipping local inference: test on a real iPhone early, not after launch, and never trust a fallback that depends on catching an error the platform kills the process before throwing.

The day HTTP 200 lied to me

Smaller story, same moral.

In a recent batch deployment I shipped the Python files for a set of new tools and missed the static engine assets โ€” the qpdf .js and .wasm files, a video library bundle. Every page returned 200. Every check I ran at the HTTP layer passed. The tools themselves were dead on arrival, because the engines they needed weren't on the server.

Page loads are not acceptance tests. Not for this kind of site. Now the rule in my deploy checklist is blunt: the file list comes from the full set of changed files, static assets included, and any tool with a local engine gets one real run in a real browser โ€” do the actual merge, the actual removal โ€” before I call it live.

If you take one transferable thing from this post, take that checklist rule. It costs ten minutes. It would have saved me a public broken launch.

What this architecture costs, honestly

It isn't free. It just sends the bill to me instead of to the user.

First loads are heavy. Old phones struggle with the heavier tools, even with the caps. There's no sync, no history, no "your recent files," because there's nothing on my side to sync from. People ask for those features sometimes. My honest answer stays the same: that product exists, it's called every other tool site, and it costs you your files.

What I get back is one sentence I can put on the site with no asterisk: your data never leaves your device. Not "encrypted in transit and deleted within 24 hours." Never leaves. People who work with contracts, client documents, medical forms or family photos hear the difference straight away.

Run the Network tab test yourself

Don't take my word for any of this. Seriously โ€” the test takes a minute.

Open devtools, go to Network, then use any tool on any site, mine included. If a file gets uploaded, you'll see it leave: a request carrying your document, usually the biggest thing in the list. Run the same test on a local-only tool like the PDF merger or the background remover and the only traffic is the page and its engine loading. Your file never appears on the wire.

"We take privacy seriously" is a sentence. The Network tab is evidence.

The question I'm left with

The technical excuses for upload-first design are mostly gone. Wasm is mature. Local inference works, Safari tantrums and all. What's left is habit, and a business model that needs your file โ€” and your account, and your data โ€” to make its numbers work.

I get that part. A site with no accounts and no data has very little to sell. I've made my peace with it; I'd rather run the smaller, stranger product.

If you build tools, try shipping just one feature the local-only way. Watch what it does to your design decisions. It clarifies things fast โ€” usually by lunch.

โ€” William Sun, Lemon Salad Studio


Sumber artikel open-source oleh William Sun di DEV Community โ€” Baca artikel asli. Topik: #webassembly #javascript #privacy #webdev

Sukai & bagikan artikel ini

Komentar