How to remove a photo background and get a transparent PNG

2 min read

Background removal used to mean either an hour with a pen tool or handing your photo to someone else’s server. A segmentation model small enough to run in a browser changes both halves of that sentence: it takes a few seconds, and the photo never leaves your machine.

This tool runs a U²-Net style segmentation model on WebAssembly inside your browser and returns a PNG with a transparent background. That matters for portraits, product shots and anything you do not have the right to publish on someone else’s server.

Open tool →Remove backgroundCut the subject out of a photo and download a transparent PNG. Runs on your device.

The steps

Remove a background locally

  1. Open the photoDrop a JPEG, PNG or WebP. A subject-centred photo works best.
  2. Wait for the first runThe first use downloads about 19 MB (runtime plus model) and caches it. Later runs skip the download.
  3. Review the cut-outCheck the edges, especially hair, fingers and thin straps.
  4. Choose an output backgroundKeep it transparent, or fill with white, black or a custom colour.
  5. Download the PNGTransparency requires PNG or WebP; JPEG cannot store it.

Getting a clean edge

  • Frame tightly. A subject that fills most of the image gives the model more to work with than a tiny figure in a wide shot.
  • Separate subject from background in colour. A white shirt against a cream wall is genuinely hard; the same shirt against a dark backdrop is easy.
  • Start from the largest version you have. Downscaling before removal throws away the edge detail you are about to need.
  • Fix the edge afterwards if it matters. A 1–2 px contract or expand pass in any editor cleans up most fringing.

Where it is weak, honestly

This is a compact model, not a commercial matting service. Hair, fur, motion blur, semi-transparent objects like glass and veils, and subjects that blend into the background are where it visibly struggles. It will also sometimes keep a shadow or take a bite out of a shoulder. For a product photo on a plain background it is excellent; for a portrait against foliage, expect some cleanup.

After the cut-out

A transparent PNG is often an intermediate file, not the deliverable. If it needs to be a specific size, resize it; if the destination does not support transparency, composite it onto a background colour in the same tool rather than converting to JPEG and getting a black box.

Open tool →Resize & cropScale to exact dimensions or a percentage, and crop to a fixed aspect ratio.

Tools used in this guide

Questions about this guide

Is the photo uploaded?
No. The model and its runtime are served from this domain and execute in your browser. The image is never sent anywhere.
Why is the first run slow?
It downloads about 19 MB of runtime and model weights, then caches them. On a slow connection that first wait is noticeable; the second run is immediate.
Can I get a JPG instead of a PNG?
You can convert afterwards, but JPEG has no alpha channel — transparent areas become a solid colour. Choose white or black as the fill colour if the destination needs JPEG.
Does it work on product photos?
That is its strongest case: a clear subject on a reasonably plain background. Busy backgrounds and fine detail at the edges are where it degrades.

All guides

Written and maintained by the FreeOnlineBox project. Every tool named in this guide runs on the reader’s own device; no file described here is uploaded to check it.