Skip to tool

Categories

ImagesBackground

Remove solid background

Make a white or selected plain-color background transparent, with adjustable edge tolerance.

On-device prototype

Adjustments

A U²-Net model detects the main subject and removes everything else, entirely in this browser.

The first run loads a 4.4 MB model and a 12 MB WebAssembly runtime from this site. Your image is never uploaded. Fine hair and fur edges may look soft.
Candidate 0.1.0-canary · Browser Canvas · Static raster output

About this background remover

Choose a JPEG, PNG or WebP and the cut-out starts on its own. AI Subject mode runs the U²-Net small model in a Web Worker inside your tab; Solid Color mode instead clears every pixel within a distance you set of one colour you pick. Save the result as PNG or WebP, the two formats that can hold transparency.

The subject cut-out runs the u2netp model through ONNX Runtime Web on a single WebAssembly thread. The weights are about 4.4 MB and the runtime binary about 12 MB, and both are served from this site, which is why this page allows same-origin requests instead of blocking every connection — it is the one exception on the site and it reaches no third party. The model sees your image squashed into a fixed 320 by 320 square, so the mask it returns is 320 by 320 and is stretched back over the full-resolution photograph; fine edges are limited by that. Source images must be JPEG, PNG or WebP and no larger than 25 MB, and the result is capped at 64 megapixels.

Runs in this tab — no uploadFree, no account, no watermark

Step by step

  1. 1Choose the photoJPEG, PNG or WebP up to 25 MB. Background removal is already switched on, and choosing a file starts the run — there is nothing else to press.
  2. 2Let the model load onceThe first run fetches about 4.4 MB of model weights and a 12 MB WebAssembly runtime from this site, and your browser caches them. Later images cost nothing extra to download.
  3. 3Or switch to Solid ColorFor a photograph taken against a plain backdrop, pick the colour, set a tolerance from 0 to 180 and an edge softness from 0 to 96, and no model is loaded at all. This mode is limited to 16 megapixels.
  4. 4Save as PNG or WebPJPEG is disabled while background removal is on, because JPEG has no alpha channel and cannot hold a transparent background. PNG is the default here.

A model that runs on your machine, not ours

Background removal is the one tool on this site that needs a machine-learning model, and the usual way to ship one is to send the photograph to a server that has it. That is a real disclosure — photographs of people, products, documents and premises — made for the sake of a few seconds of compute.

Instead, the model comes to you. The weights are a static file on this site, the runtime is a static WebAssembly binary on this site, and both are fetched by a Web Worker running in your own tab. This page’s Content Security Policy is relaxed exactly two notches to allow that: same-origin connections, and permission to compile WebAssembly. No third-party origin is reachable, peer connections stay blocked, and the worker is terminated as soon as the cut-out finishes or you leave the page rather than sitting there holding the model.

The identity of what is served is pinned: a test hashes the model file on disk and compares it against a checked-in SHA-256, and hashes the WebAssembly runtime against the copy in the installed dependency. A silently swapped model would fail the build.

Why the edges look the way they do

The model works at a fixed 320 by 320 pixels. Your photograph is squashed into that square, a mask is produced at that size, and the mask is then stretched back up over the full-resolution image with smoothing. The subject keeps every pixel it had; only the mask is upscaled.

That is why the outline cannot resolve detail finer than a 320-wide grid. Hair, fur, fine mesh, thin branches and glass edges are where it shows first, and no amount of source resolution changes it, because the model never sees the source resolution.

For a photograph taken against a plain backdrop, Solid Color mode with a raised edge softness often gives a cleaner edge than the model does, because it is working on your actual pixels rather than on an upscaled mask.

The two modes, and when each is right

AI Subject scores every part of the image for how much it looks like the subject and keeps what scores highly, so it works on a photograph with a busy or textured background — a person on a street, a product on a desk. If fewer than one pixel in five hundred comes back as foreground, it stops with a message suggesting Solid Color rather than handing you a blank picture.

Solid Color does no inference at all. It clears every pixel within a straight-line colour distance of the one you pick, with a default tolerance of 36 and an edge softness of 24, and it reports how many pixels it cleared. It is the right choice for a product shot on white, a scanned signature, or a logo on a flat background — and it is exact, repeatable and instant, because there is no model involved.

What it refuses

Anything that is not a static JPEG, PNG or WebP — HEIC, AVIF, TIFF, GIF and raw camera files are not accepted — and any file over 25 MB. JPEG output is refused while background removal is on, with a message explaining that JPEG cannot carry a transparent background; turn background removal off and the editor fills the canvas with white instead, which is what JPEG needs.

After encoding, the saved image is decoded again and its dimensions compared with what was drawn, and a mismatch fails the run rather than handing you a file.

The other half of it is that the code has nowhere to send anything from. lib/tools/local-source-policy.test.ts reads every source file under lib/tools, workers, components and app on every test run and fails if any of them contains fetch, XMLHttpRequest, WebSocket, EventSource, sendBeacon or a peer connection, or even a remote address written in a comment. An upload cannot be added here by accident, because the file that would contain one cannot be committed.

Questions people ask

What is the difference between AI Subject and Solid Color mode?
AI Subject runs the U²-Net small model on your image and keeps whatever it scores as the subject, so it can work on a photograph with a busy background. Solid Color does no inference at all: it clears every pixel within a chosen distance of one colour you pick, with a default tolerance of 36 and an edge softness of 24 measured as straight-line RGB distance. Solid Color is limited to 16 megapixels per image; AI Subject is bounded by the 64 megapixel canvas cap that applies to every edit here.
Why can I not save the result as a JPEG?
JPEG has no alpha channel, so it cannot carry a transparent background. With background removal switched on the tool refuses JPEG and defaults the output to PNG. If you want a flat background instead, turn background removal off: the editor then fills the canvas with white before drawing, which is what JPEG output needs.
Does the model run on a server?
No. The model weights and the ONNX Runtime WebAssembly binary are static files on this site, fetched by a Web Worker in your own tab, and this page’s Content Security Policy allows connections to this site only, so no third-party origin is reachable. The worker is terminated as soon as the cut-out finishes or you leave the page, so it does not sit holding the model afterwards.
Why are the edges of my cut-out rough?
The mask is produced at 320 by 320 pixels and then scaled up to your image’s own size with smoothing, so it cannot resolve detail finer than that grid. Hair, fur, fine mesh and thin branches are where this shows first. For a photo taken against a plain backdrop, Solid Color mode with a raised edge softness often gives a cleaner edge than the model does.
Which files does it refuse?
Anything that is not a static JPEG, PNG or WebP, and any file over 25 MB. HEIC, AVIF, TIFF, GIF and raw camera files are not accepted. It also refuses to hand you a file whose dimensions do not match what it drew, re-reading the saved image to check.
How much does it download, and how often?
About 4.4 MB of model weights and about 12 MB of WebAssembly runtime, both from this site, on the first run only — your browser caches them afterwards. Solid Color mode downloads neither, because it does no inference. Your image is never among the things fetched; it is read from your own disk into the page.