How AI Background Removal Works in Your Browser, Without Uploading
In-browser background removal works by downloading the AI model to your browser once and running it on your own computer or phone, so the photo is cut out on your device instead of on a company's server. This is a plain-language tour of what happens between pressing the button and saving the PNG, why the first run is slower, what your device needs, and how to confirm for yourself that your photo stays put.
What happens when you press "Remove background"?
Here is the sequence inside the AI Background Remover, step by step:
- Your photo is opened in the tab. Choosing a file gives this one web page permission to read that one file, the same way a desktop app opens a document. The image is decoded into memory and drawn on the page. If its longest side is over 4096 pixels, it is scaled down to 4096 so the tab does not run out of memory.
- The AI library loads. Only when you press the button does the page fetch the code that does the work, IMG.LY's open-source background-removal library. Keeping it out of the initial page load means visitors who only read the page never download it.
- The model downloads, the first time only. The library fetches the neural network itself, about 40 MB. The status line shows "Downloading model" with a percentage while this happens.
- The model looks at your photo. It produces a mask: for every pixel, a value saying how confident it is that the pixel belongs to the main subject. The status changes to "Processing".
- The mask becomes transparency. Pixels the model is sure about become fully opaque or fully transparent, and uncertain edge pixels such as wisps of hair become partly transparent.
- You save the result. The cut-out appears over a checkerboard, and "Download PNG" writes the file from the tab straight to your downloads folder.
What is an AI "model", and why is it 40 MB?
A neural network is a long chain of simple maths operations whose behaviour is set by millions of numbers called weights. Those weights were learned by showing the network a large set of example photos with known cut-outs until its guesses matched. The model file you download is mostly those numbers, which is why it is tens of megabytes rather than a few kilobytes of code.
It also helps to know what kind of model this is. It is a segmentation model: it only decides, pixel by pixel, keep or remove. It does not paint, invent or alter anything in your photo, which is why the subject in the output is pixel-for-pixel the same as in your original.
WebAssembly, WebGL and WebGPU in plain terms
Running a neural network takes a lot of arithmetic. Browsers offer three ways to do heavy maths quickly, and you will see these names in discussions of browser AI:
| Technology | What it is | Where you meet it on this site |
|---|---|---|
| WebAssembly (WASM) | A compact format for fast, compiled code that runs on your processor (CPU), at speeds close to a desktop program | The background remover runs its model through ONNX Runtime Web on WebAssembly |
| WebGL | A graphics interface for your GPU that libraries also use for number crunching | The AI upscaler runs its TensorFlow.js model on WebGL |
| WebGPU | The newer GPU interface, designed with general computation and machine learning in mind | Supported by a growing number of browsers. The background remover uses the WebAssembly path, which behaves the same across browsers. |
The practical takeaway: you do not need to install anything. Any current version of Chrome, Edge, Firefox or Safari already includes WebAssembly.
Why is the first run slower than the rest?
The first press does three jobs that later presses skip:
- Downloading the library and the roughly 40 MB model. How long that takes depends entirely on your connection.
- Preparing the model: the browser compiles the WebAssembly code and loads the weights into memory.
- Processing your photo, which is the only step every run needs.
After that, your browser keeps the model in its cache, so the next photo, and your next visit, go straight to processing. The model is downloaded again only if you clear your browsing data, use a private window (which discards its cache when closed), or switch to a different browser or device. The same library also powers Change Background Color, so a model you have already downloaded usually helps there too.
What device do you need?
- A current browser. Desktop and mobile versions of the major browsers all work.
- Enough free memory. The photo, the model and the working data all sit in memory at once. Laptops and desktops handle full 4096-pixel images comfortably. On an older or low-memory phone, a very large photo may fail or the tab may reload. If that happens, crop or resize the photo first with the image resizer and close other tabs.
- Some patience on slower hardware. Because the work runs on your processor, a recent laptop finishes faster than an older phone, and a laptop on battery-saver mode may be slower than when plugged in. Nothing is wrong if it takes a little while; the status line keeps you updated.
- A connection for the first run only. The model has to arrive once. A Wi-Fi connection is kinder to a mobile data plan for that first 40 MB.
Why is nothing uploaded?
Because nothing needs to be. A server-based remover has to receive your photo because the model lives on the server. Here the model comes to you, so the whole job can happen inside the tab: the photo is read from your disk into memory, processed in memory, and written back to your disk as a PNG. There is no step at which the page has a reason to send it anywhere, and the site has no server-side code that could receive it.
How can you verify it yourself?
You do not have to take that on trust. On a desktop browser:
- Open the background remover and press F12 (or right-click and choose Inspect), then open the Network tab.
- Choose a photo and press "Remove background".
- Watch the list. You will see the library and model files arriving, which are large downloads coming to your browser.
- Look for any request going out that carries your photo: a POST or PUT request whose size is close to your image file's size. There will not be one.
Remember that a model download is not an upload: data flowing to you is how the tool gets its brain, and none of your data flows back. For a fuller method that works on any website, including an offline test, read how to tell if a website uploads your files.
Is local AI as good as a cloud remover?
The quality of a cut-out comes from the model, not from where it runs. The model here is a dedicated background-removal network, and on portraits, products and pets it produces clean, ready-to-use edges. Some cloud services run larger models on powerful servers, and very fine detail such as loose hair against a busy background is the hardest case for every tool. When an edge needs extra care, the manual background remover lets you touch it up by hand.
If you are mainly comparing free options on cost, watermarks and output size, see what you get from a free remover with no watermark. If you build web apps and want the technical side, read how we built the client-side background remover.
See it run on your own device
Open the Network tab, then remove a background and watch what moves.
Remove Background Now