A tiny web app that removes the background from a photo entirely in the browser. No account, no API key, no backend, no upload — the image never leaves the device.
Three files: index.html, styles.css, app.js. Works on desktop and mobile.
- Auto remove (AI) — runs the
@imgly/background-removalONNX model client-side (loaded from a public CDN and cached by the browser). Good for people, products, pets, hair. - Quick remove — pure-JS flood fill from the image border. Instant, works offline, best when the background is a fairly flat colour.
- Touch up — erase / restore brushes and a magic wand, with undo & redo.
- Background — keep it transparent or drop in any solid colour.
- Download — PNG (with transparency) or JPG.
- Drag & drop, file picker, or paste from the clipboard.
Open it through a local web server — file:// blocks the ES-module import the AI engine needs.
python3 -m http.server 8123Then visit http://localhost:8123. (The manual tools also work from file://; only the
AI button needs the server.)
It is a static site, so anything works. For GitHub Pages: Settings → Pages → Deploy from
branch → main / root.
| Key | Action |
|---|---|
Ctrl/Cmd + V |
paste an image |
Ctrl/Cmd + Z |
undo (Shift to redo) |
Ctrl/Cmd + S |
download PNG |
[ / ] |
smaller / bigger brush |
- The AI model is ~40 MB on first use; after that the browser cache serves it, and it also works offline. Everything else needs no network at all.
- Images larger than 2400 px on the long edge are scaled down so editing stays responsive.
- Inference runs on the CPU via WebAssembly — expect a few seconds per image on a phone.