A technical guide to how BG-Zero performs AI background removal entirely in your browser using WebAssembly, WebGPU, and ONNX Runtime — without sending images to any server.
This article explains the technology behind removing backgrounds without uploading images. See our complete no-upload background removal guide.
Client-side background removal means the AI model that detects and removes image backgrounds runs entirely within your web browser — on your device's CPU or GPU — rather than on a remote cloud server.
The key distinction: your image data never crosses a network boundary. The AI inference happens where the image already is — on your machine.
Here's how BG-Zero processes an image from start to finish, entirely client-side:
Browser File API reads the image into an ArrayBuffer in local memory. No network request.
The image tensor is passed to the AI model running in WebAssembly/WebGPU. The model outputs a segmentation mask.
The mask is applied to the original image via Canvas API, setting background pixels to transparent.
Canvas.toBlob() generates the final transparent PNG in memory. Blob URL triggers download.
BG-Zero can use two execution backends for AI inference:
| Aspect | WebAssembly (WASM) | WebGPU |
|---|---|---|
| Execution target | CPU (multi-threaded) | GPU (parallel compute) |
| Browser support | All modern browsers | Chrome 113+, Edge 113+ |
| Speed (typical image) | 2–8 seconds | 0.5–2 seconds |
| Fallback | Always available | Falls back to WASM if no GPU |
Client-side processing doesn't just add privacy — it eliminates entire categories of risk:
Client-side AI comes with trade-offs compared to server processing:
BG-Zero's technical architecture includes:
Technical questions about browser-based AI processing
It means the AI inference runs entirely in your web browser (the client) rather than on a remote server. Your image is processed using your device CPU/GPU via WebAssembly or WebGPU, and never leaves your machine.
All modern browsers support WebAssembly (Chrome, Firefox, Safari, Edge). WebGPU acceleration is available in Chrome 113+, Edge 113+, and experimentally in Firefox and Safari.
Yes. WebAssembly runs in a sandboxed environment within the browser. It cannot access your file system, network, or other tabs. It only processes data explicitly passed to it by the web application.
Server processing requires uploading your image, which creates privacy risks: data in transit, potential storage, possible use for training, and compliance concerns. Client-side eliminates all these issues architecturally.
If your browser supports WebGPU and BG-Zero detects a compatible GPU, yes. This accelerates processing significantly. Otherwise it falls back to CPU via WebAssembly, which is slower but still functional.
Process an image entirely in your browser — no server, no upload, no account.
Try BG-Zero