A lot of the best file tools are command-line programs. OxiPNG shrinks PNGs losslessly, SVGO minifies SVGs, rembg removes image backgrounds, and FFmpeg does everything to video. They're excellent, but each one asks you to install Rust, Node, Python or a native binary first. That's fine on your own machine, and annoying on a locked-down work laptop, a Chromebook, or when you just need to do one file.
I build a small site of browser tools, and over the last few weeks I moved these engines into pages that run entirely in the tab. Here is what that involved, and where the browser version is honestly worse.
1. OxiPNG: the easy one
OxiPNG is written in Rust, and the jSquash project already publishes it compiled to WebAssembly (it's the same build Squoosh used). The .wasm file is only about 164 KB, so I self-host it instead of loading it from a CDN.
The whole pipeline is: read the file into an ArrayBuffer , call optimise(data, level) , and compare sizes.…