Skip to main content

AI Background Remover

Run RMBG-1.4 in your browser to remove backgrounds, preserve source-resolution PNG output, tune edges, and erase or restore areas with brush and lasso tools.

Loading tool...

How to use

  1. 1

    Choose a JPEG, PNG, or WebP image within 25 MiB and 12 megapixels by dropping, browsing, or pasting it.

  2. 2

    After selection, the AI model downloads and runs with WebGPU or WASM. The first run requires a large download.

  3. 3

    Processing time varies by device, execution backend, and image. The before/after comparison appears when inference finishes.

  4. 4

    Drag the slider left and right to compare the original and the result. Adjust background color (Transparent, White, Black, or Custom) to match your use case.

  5. 5

    Use the Edge Adjustment sliders to fine-tune edge smoothness, feathering, and sharpness of the mask. Then click "Download PNG" to save the result with full alpha transparency.

Key Features

  • Client-side Edge AI: briaai/RMBG-1.4 runs with WebGPU or WASM, and image files are not sent to the model host.
  • Supports portraits, products, animals, vehicles, and general objects. Brush and lasso corrections handle difficult low-contrast or detailed boundaries.
  • Instant before/after comparison: a draggable slider overlays the original and result images so you can evaluate quality at a glance before downloading.
  • Transparent background support: the output is a PNG with a full alpha channel — ready for use in design tools, presentations, e-commerce product shots, and more.
  • Background color replacement: apply white, black, or any custom color behind the subject in one click, previewed in real time.
  • Edge Adjustment controls: three sliders (Smooth, Feather, Refine) let you soften hard edges, add natural-looking blur at transitions, and sharpen or soften the mask contrast.
  • Drag & drop + paste: load images by dragging from your desktop or file manager, pasting with Ctrl+V, or using the file picker.
  • Model caching can reduce repeat downloads; retention and reload time depend on browser settings.

FAQ

Q. Is my image uploaded to a server?

A. The background-removal feature does not make an image-upload request. Model files are downloaded, while the selected image is processed in browser memory.

Q. How large is the AI model download?

A. RMBG-1.4 assets download after the first image is selected. The total is large and can vary by runtime files; browser settings determine whether and how long they remain cached.

Q. What image formats does it accept?

A. Input supports JPEG, PNG, and WebP up to 25 MiB. PNG output preserves source dimensions up to 6,000 px per side and 12 megapixels total.

Q. Why does it work best on people and objects?

A. RMBG-1.4 was trained on a large, diverse dataset covering portraits, animals, products, vehicles, and general objects. It performs best when the subject has a reasonably defined boundary. Very complex textures or low-contrast subjects may produce less precise masks.

Q. What do the edge adjustment sliders do?

A. Smooth applies a light blur to reduce jagged pixel-level artifacts. Feather applies a stronger blur that creates a soft, natural-looking edge fade — useful for portraits. Refine increases the contrast of the mask transition, making edges crisper and removing semi-transparent halos.

Q. Can I use the result in Photoshop or Figma?

A. Yes. The downloaded PNG file preserves the alpha channel. It can be imported directly into Photoshop, Figma, Sketch, Canva, Affinity Photo, and any other tool that supports transparent PNG.

Technical Deep-dive: Edge AI with Transformers.js and RMBG-1.4

This tool uses Transformers.js v3 and briaai/RMBG-1.4. ONNX inference runs with WebGPU or falls back to WASM. Because the output is a probability mask, results can be imperfect; manual correction controls are part of the workflow.

Inference runs inside a Web Worker, separating model fetch, ONNX session creation, and backend selection from the main interface. Browser caching may reduce repeat downloads but is not guaranteed.

When an image is submitted, the Worker receives its raw bytes as an ArrayBuffer transferred without copying. A Blob URL is constructed inside the Worker, and RawImage.fromURL() decodes it into an RGB tensor. The AutoProcessor normalises the image to 1024×1024 and produces a pixel_values tensor ready for the model.

The model outputs a single-channel probability mask at the same spatial resolution. The Worker uses RawImage.fromTensor() and .resize() to scale the mask back to the original image size, then assembles the final RGBA result by combining the original pixel data with the mask values as the alpha channel. This composited data is transferred back to the main thread as a zero-copy ArrayBuffer.

On the main thread, the composited data is drawn to an HTML Canvas element. Background color replacement is achieved by filling the canvas with the selected color and drawing the RGBA image on top using the browser's native alpha compositing (source-over mode). The before/after slider uses CSS clip-path on an absolutely positioned element, giving smooth GPU-accelerated visual transitions without any JavaScript animation loop.

Privacy & Security

The background-removal image path is client-side. The selected image is held as a Blob URL and typed arrays in browser memory and is released when replaced or after the tab closes.

The AI model and runtime files are fetched over HTTPS and may be cached depending on browser settings. This feature does not upload the selected image to the model host, but model downloads and normal page resources still use the network.

Avoiding an image upload reduces exposure compared with cloud processing, but it cannot eliminate device-side risks such as untrusted extensions, shared computers, or malware. Use a trusted device and browser profile for sensitive images.

Examples, Finishing Checks, and Common Mistakes

Examples

  • Remove product photo backgrounds for ecommerce pages and documents.
  • Clean up profile photos for thumbnails and social media assets.
  • Cut out subjects for presentation slides and design mockups.

Cautions

  • Hair, transparent objects, and thin edges may still need manual review.
  • For commercial use, check the rights and license of the source image.
  • Review edges on both light and dark backgrounds after removal.

Common Mistakes

  • Publishing the automatic result without checking the edges.
  • Starting from a low-resolution image and expecting clean outlines.
  • Checking only on a white background and missing bright edge artifacts.