FilesShifters

Remove the background from a photo as a transparent PNG

It runs in your browser: your files stay on your device and are never uploaded.

Experimental It uses a model that runs in your browser, it can get things wrong, and it has not yet been tried on real phones.

Drop your photos here or press to choose them

JPG, PNG or WebP photos, best with a single subject

To remove the background from a photo: an item to sell, a product to place on a slide. The background turns transparent, white or the colour you choose.

How to remove the background from a photo

  1. Add the photos. JPG, PNG or WebP, more than one if you like: each is cut out on its own.
  2. Choose what replaces the background. Transparent for a PNG to place over another background; white or a colour for a JPG ready to use.
  3. Check what gets downloaded. The panel says how much the engine and the model weigh before anything is downloaded, or that they are already on this device.
  4. Press “Remove background”. First the engine and the model arrive, if they are missing, with their own bar; then the photos are cut out one at a time.
  5. Check and download. Under each file you see the photo before and after, with the transparent part on a checkerboard: look at it closely before you use it.

When it works, and when it does not

It works well with a single subject on a plain background: a product on a studio backdrop, an object against a smooth wall, an animal on an even lawn. There the cut-out almost always comes out clean.

The model is small, and that is what lets it run in the browser. It fails in predictable ways:

  • on fine hair and fur it leaves a halo of the background, or cuts them off;
  • with several subjects it often keeps only one, or pieces of each;
  • on a busy background (leaves, crowds, shelves) it keeps bits of background or loses bits of subject;
  • when the subject has the same colours as the background, it guesses the edge;
  • in a photo with no main subject (a landscape, a room) there is nothing to cut out: the result can come out almost empty, and the note says so.

Even when the cut-out is right, the edge is soft: the model looks at the photo shrunk to 320 pixels a side, and the outline it finds is scaled back to full size with a blur. Fine for a product listing or a slide; not for a composite meant to be looked at closely. We measured it on two test images whose exact outline we know: on a box in front of a studio backdrop the cut-out overlaps the true outline by 99.7%; on three objects in front of a background of coloured blotches, by 44%.

What gets downloaded, and why

Finding the subject takes a model, and running it takes an engine: 14.2 MB for the engine, 4.4 MB for the model. They download from this site, once, and only after you press the button.

That is 18.6 MB in all, more than the rest of the page put together: this is why they do not come with the page, and why even hovering over the tool does not start them. If the server compresses them, less travels over the network.

The model is U²-Net in its small version, released by its authors under the Apache 2.0 licence, in the format prepared by the rembg project. The engine is ONNX Runtime Web (MIT licence), which runs it in WebAssembly. Everything is served from filesshifters.com, under /modelli/, with the model’s licence and origin next to it: no other site receives a request. After the first time the files stay in the browser cache and the panel says so; with the page open it works offline too.

Transparent, white or a colour

With a transparent background you get a PNG, the common format that keeps transparency: you can place it over any background, on a slide or in another image. With white or a colour you get a JPG.

Why JPG: once the background is painted there is nothing transparent left to keep, and a photo as a JPG weighs far less than the same photo as a PNG: on the 12-megapixel test photo, 0.6 MB as a JPG on white against 6.0 MB as a transparent PNG. It is also the format almost every listings site asks for.

In all three cases the result has the same pixel dimensions as the original, with the photo’s orientation already applied. The photo’s hidden data (location, date, phone model) does not carry into the new file, because it is a redrawn image.

What this tool does not do

  • No touching up by hand. There is no brush to add or remove pieces: if the cut-out is wrong, it has to be redone in another program.
  • It does not choose between subjects. It cuts out what the model judges to be the main subject, and with several subjects it often gets it wrong.
  • It does not open HEIC photos from iPhones: convert them first with HEIC to JPG.
  • It does not work on photos that are too large. At most 24 megapixels per photo: above that, the button stays off and the panel says why, before anything is downloaded. A huge photo can be shrunk with Resize images. Safari, especially on iPhone, refuses images above 16.7 megapixels: there a larger photo is skipped and the note says so.
  • It is not fast on a phone. On a computer a 12-megapixel photo takes a couple of seconds; on a phone longer, and we have not measured it yet.

How to check for yourself that nothing leaves the browser

Open the browser’s developer tools, Network tab, and add a photo: no request goes out for the cut-out. When you press the button the files under /modelli/ appear, all from this site, and no request carrying your photo.

The second test is to unplug the network. After the first time, with the page still open, take the computer or phone offline and cut out another photo: the result arrives anyway, because everything it needs is already in the browser.

Frequently asked questions

Is the photo uploaded anywhere?

No. The cut-out happens in your browser, on your device. All that comes from the network is the engine and the model, the first time; nothing goes out.

Why do I have to download something?

Because finding the subject takes a model, which weighs a few megabytes, and an engine to run it. Instead of sending your photo to a server that already has them, the engine and the model come to you. They download once, from this site, and only when you press the button.

Is the result as good as online services?

No, and we would rather tell you up front. Services that cut out on their own servers use much larger models, which do better on hair and difficult edges. This model weighs 4.4 MB because it has to run in your browser: with a single subject on a plain background it is enough, for the rest it is not.

How long does it take?

On a computer a 12-megapixel photo takes a couple of seconds, plus the time to download the engine and the model the first time. On a phone it is slower; you can cancel at any moment.

Does it work offline?

Yes, after the first time and with the page open: the engine and the model stay in the browser. The page itself has to be opened online, because the site does not keep its pages offline.

How can I check that this is true?

Open the developer tools, Network tab, and cut out a photo: you will see this page’s files, the engine and model files under /modelli/, the requests of the visit count described at the bottom of the page, and no request carrying your photo.