I actually did a WebAssembly port of the GNU Units library and you can now use it in your browser.
Demo: https://yanosh.net/units-wasm/ GitHub Repo for the demo: https://github.com/yanosh-k/units-wasm GitHub Repo for the WASM project: https://github.com/yanosh-k/gnu-wasmunits