How to Remove an Image Background Locally

Remove any image background with an on-device AI model, or fall back to a color key for flat studio shots. Export a transparent PNG without uploading the photo.

By Haivix Team 8 min read
Abstract product silhouette on a transparent checkerboard background

Product shots, portraits, and thumbnails often need a transparent PNG. The usual workaround is uploading the photo to a cloud cutout service. A modern browser can run the matting model itself, so the photo never leaves your device.

The Haivix Background Remover runs in the browser. Upload one JPEG, PNG, WebP, GIF, or BMP, keep the AI method selected, and press Remove background. The first run downloads a local model (roughly 12–95 MB depending on quality and hardware) and caches it; later runs start immediately.

Flat studio backdrops can still use the faster color key: switch Method to Color key, click the canvas to sample the backdrop, then set tolerance (0–180) and soft edge (0–100).

How the AI matting works

The photo is resized to 512 px, run through a segmentation model on ONNX Runtime Web, and the predicted alpha mask is scaled back over the full-resolution image. The downloaded PNG keeps the source dimensions and real transparency.

WebGPU devices use the higher-quality BiRefNet-lite model. Browsers without WebGPU use the smaller MODNet model, and the tool falls back automatically if the larger model fails to load or run.

The color key remains available and is still the better choice for logos, screenshots, and perfectly even backdrops: pixels within an RGB distance of the sampled color are cut to alpha 0, with a soft-edge ramp.

After you export

Resize for the storefront with the Image Resizer. If the PNG is still too heavy for a portal, compress carefully with the Image Compressor—covered in the compress images guide.

Shoot on a clean, evenly lit backdrop when you can. Good source photos beat aggressive tolerance settings.

Checklist before you publish the PNG

Open the Background Remover, drop a photo, and download the PNG. Processing stays in the tab.

  • You used AI for people, pets, and busy backgrounds.
  • You used the color key only for flat, single-color backdrops.
  • You checked hair, fur, and transparent edges at 100% zoom.
  • You let the first run finish downloading the model.
  • You exported PNG, not JPG, so transparency survives.