Remover: Background removal
Remove image backgrounds client-side. Drop a photo and get a PNG with an alpha channel. Private by default, and offline-capable once the model is cached.
Try Remover
Runs in this tab · nothing uploaded
Drop an image here
or click · PNG JPG WEBP
What it does
Drop a photo, get a transparent PNG.
- BEN2 (2025) is a general background eraser: hair, fur, products and hard edges, not just portraits.
- ~219 MB of fp16 weights, cached after the first download.
- Output is a PNG Blob with alpha, same size as the input.
- Runs on WASM. WebGPU dies in BEN2’s LayerNorm shader (fp16 activation, fp32 scale and bias) on current onnxruntime-web. The fix is upstream (onnxruntime#32629, 2026-09-22) and not published yet.
- Sample photos: Messi by Bryan Berlin (CC BY-SA 4.0), alfajores by V!NZ (CC BY-SA 3.0). Both resized.
Specifications
- Package
- runonweb/remove-bg
- Base model
- BEN2 · Prama LLC
- License
- MIT
- Weights
- onnx-community/BEN2-ONNX
- Download
- ~219 MB
- Quantization
- fp16 on WASM
- Backend
- WASM only
- Input
- Image
Get started with runonweb/remove-bg
pnpm add runonwebimport { RemoveBackground } from 'runonweb/remove-bg'
const remover = new RemoveBackground({
onProgress: (info) => console.log(info.status, info.progress),
})
await remover.load()
// Blob, File, URL, HTMLImageElement, ImageData, or canvas
const png = await remover.remove(imageFile)
// png is a PNG Blob with alpha channel
document.querySelector('img').src = URL.createObjectURL(png)
remover.dispose()Same shape everywhere: construct, load(), run, dispose(). Pass onProgressto show download progress on first use.
Questions about Remover
Does Remover run on device?
Yes. Weights download once and stay in the browser. Nothing is sent to a server.
Which model does Remover use?
BEN2 by Prama LLC, under MIT. runonweb loads the onnx-community/BEN2-ONNX weights and runs fp16 on WASM.
How big is the Remover download?
~219 MB, fetched once on first use. The browser caches the weights, so later loads skip the network and keep working offline.
What does Remover cost?
Nothing. runonweb is free and MIT-licensed, with no device limits, tokens or sign-in. The weights keep their own license: MIT.
Which browsers support Remover?
Any modern browser with WebAssembly. BEN2’s LayerNorm shader fails on the current ONNX Runtime WebGPU build, so runonweb pins this model to WASM.
Can I use a different model with runonweb/remove-bg?
Yes. See each module’s docs for the options it accepts (model, size, language…). Check the license and test both backends before shipping.