Browser-based image tool · JPG, PNG, WEBP → transparent PNG

Remove White Background

Starting at the edges of the picture, every connected pixel close to the background colour is made transparent. The same colour inside the subject stays, because the fill cannot reach it without crossing the subject. The image is processed in this browser tab and never uploaded.

Input

One image at a time, up to 25.00 MB and 25 megapixels.

This works on flat or single-colour backgrounds, such as a logo on white or a product shot on a plain sweep. Photographs with busy or textured backgrounds will not cut out cleanly.

Drop an image here or click to choose

.jpg, .jpeg, .png, .webp

Colour to remove

Detected once an image is added.

Result

Transparent areas show as a checkerboard.

Add an image to see it here with its background removed.

Remove White Background

Operator: Abdulla Al Fahad. How tools are built and checked

A logo exported on a white canvas looks fine on a white web page and wrong everywhere else: on a dark footer, a coloured slide or a printed mug it sits inside a visible white rectangle. Remove White Background turns that rectangle transparent and gives you a PNG with an alpha channel, which keeps its shape on any colour you place it on.

The method is a colour key with a flood fill, the same idea as the magic wand in a desktop editor. It does not try to recognise objects. It looks at the colour around the edges of the picture, then eats inward through every pixel close enough to that colour, and stops where the colour changes. That makes it predictable on logos, icons, scanned signatures and product photos shot against a plain sweep, and the wrong tool for a portrait in a park.

Key features

  • Automatic background colour: the most common border colour, shown as a swatch with its hex code and the share of border pixels it covers.
  • Manual colour choice with a colour picker, for grey, coloured or green-screen style backdrops.
  • Tolerance from 0 to 100, defined as a percentage of the largest RGB distance, with the distance it allows printed under the slider.
  • Edge-connected fill, so matching colour inside the subject is kept.
  • Feather from 0 to 4 pixels that fades the kept pixels next to the cut.
  • Live preview on a checkerboard, a count of transparent pixels, and a PNG download.
  • Files are checked by signature, with a 25 MB file limit and a 25-megapixel limit checked before the image is drawn. The pixel limit is lower than on the other image tools because the cut-out holds two full copies of the pixels while it works.

Input can be JPG, PNG or WEBP. The file type is read from its first bytes, so a PNG renamed to .jpg is still treated as a PNG, and a file that is not an image at all is refused with a message under the drop zone. EXIF rotation is applied when the image is decoded, so a sideways phone photo is cut out upright.

Output is always PNG, because it is the common format that stores a full alpha channel without loss. JPG has no transparency at all; saving a cut-out as JPG would put a solid colour back. Expect the PNG to be larger than a JPG input: PNG is lossless, and a JPG photo has noise that PNG compression cannot squeeze.

The PNG is written from the canvas pixels, so it carries no copy of any colour profile or Exif data from the source. How an embedded profile is treated while the image is decoded depends on the browser, so a photo in a wide colour space can come out with slightly different colours.

How it works

After decoding, the tool reads every pixel along the four edges. To find the automatic colour it groups them into buckets of 8 levels per channel, so slight JPEG noise does not split one white into dozens of near-whites, picks the bucket with the most pixels, and averages the real colours inside it. Pixels that are already transparent are ignored.

Tolerance is a distance in RGB space. The distance between two colours is the square root of the sum of the squared differences of red, green and blue, and the largest possible value is between black and white: √(3 × 255²), about 441.7. A pixel matches when its distance from the chosen colour is at most the tolerance percentage of 441.7. At 20 that is about 88.3.

The fill starts from every edge pixel that matches and moves to the pixel above, below, left and right whenever that neighbour matches too. Each pixel it reaches becomes fully transparent. Pixels that were already transparent count as matching, so the fill passes through them. Diagonal steps are not taken, which stops the fill from slipping through a one-pixel diagonal gap in an outline.

Feathering measures, for each kept pixel, how far it is from the nearest removed pixel, using steps of 1 for a straight move and about 1.33 for a diagonal one. A kept pixel at distance d keeps d ÷ (feather + 1) of its opacity until d reaches feather + 1. With a feather of 2, a pixel right next to the cut keeps a third of its opacity, the next one two thirds, and the third one is untouched.

Common use cases

  • A café owner has a logo that the printer supplied only as a JPG on white, and needs it to sit on the dark brown band of a new menu.
  • An online seller photographed a ceramic bowl on a white paper sweep and wants the bowl alone on a marketplace listing with a pale grey page background.
  • A freelancer scanned a handwritten signature on white paper and needs a transparent PNG to place over a contract line.
  • A teacher copies a clip-art diagram with a light grey background into slides that use a blue theme.
  • A developer receives app icons rendered on a flat magenta matte and picks magenta as the colour to remove instead of white.

How to use this tool

  1. Drop one JPG, PNG or WEBP onto the box, or press Enter on it to choose a file.
  2. Leave Colour to remove on Automatic and check the swatch, or choose Pick a colour and set it.
  3. Watch the preview update and adjust Tolerance until the background is gone and the subject is whole.
  4. Set Feather to soften the edge, if the cut looks jagged.
  5. Click Download PNG. The file is named after the original with -transparent added.

Example

A 900 × 600 JPG of a navy logo on white, with a pale yellow star (#FFF5CC) touching the logo's outer edge and a light grey shadow (#C8C8C8) under it

Automatic colour: #FFFFFF, 100% of the border
Tolerance 9  → matches distance ≤ 39.8
Tolerance 20 → matches distance ≤ 88.3
Tolerance 25 → matches distance ≤ 110.4

What each pixel colour does at those settings

#E6E6E6 JPEG noise in the white (distance 43.3): kept at 9, removed at 20 and 25
#FFF5CC star (distance 52.0): kept at 9, removed at 20 and 25 because it touches the background
#C8C8C8 shadow (distance 95.3): kept at 9 and 20, removed at 25
Navy #1F2A44 logo (distance about 361): kept at every setting shown
Best choice here: tolerance 10 or 11, which clears the noise (43.3 ≤ 44.2 at 10) and keeps the star (52.0 > 48.6 at 11)

Tips for best results

  • Start at the default tolerance of 20, look at the preview, then move the slider in small steps. Lower it if pale parts of the subject vanish; raise it if a grey rim of background is left around the edge.
  • When the background is not white, switch to Pick a colour and choose it, or leave Automatic on and check the swatch it shows. The swatch is the average of the most common border colour, and the percentage beside it says how much of the border that colour covers.
  • A percentage well under half in the Automatic readout means the border is mixed, for example a subject that touches the edge or a gradient backdrop. Expect a rough cut and consider cropping so the subject sits inside a margin of background.
  • Use a feather of 1 or 2 pixels for logos with smooth curves. Leave it at 0 for pixel art or tiny icons, where a hard edge is part of the look.
  • Check the result on the checkerboard at full size before downloading. Light halos are much easier to see there than on a white page.

Common pitfalls

White enclosed by the subject is kept on purpose: the inside of a letter O, the gap in a mug handle or the space between a person's arm and body stays white, because the fill from the border cannot reach it without crossing the subject. If those gaps should be transparent, this tool will not do it; erase them in an image editor afterwards.

Pale parts of the subject that touch the background can leak away. A cream label on a white bottle that reaches the edge of the bottle is close to white, so at a high tolerance the fill walks straight into it.

Soft drop shadows under a product are a gradient from grey to white. Part of the shadow goes, and part stays as a grey smudge with a hard line where the tolerance ran out.

Anti-aliased edges are a blend of the subject colour and the background. After the cut, those blend pixels keep their light tint, which shows as a thin pale outline on a dark background. Feathering fades them but does not recolour them.

Heavily compressed JPGs have blocky noise in the white area. Some of those blocks fall outside a low tolerance and stay behind as faint specks; raise the tolerance a few points to catch them.

Common errors and how to fix them

"... is not a recognised image. Only JPG, PNG and WEBP files can be used here"
The first bytes of the file do not match any of those formats, whatever its extension says. Open it in an image viewer and export it as PNG or JPG.
"... is 6400 × 4800 pixels; the limit is 25 megapixels"
Each decoded pixel takes 4 bytes, so a 25-megapixel image is about 100 MB per pixel buffer. The tool holds two of them, the original pixels and the working copy, plus a 1-byte-per-pixel mask and the canvas used to save the PNG. Scale it down in an editor first; a cut-out for a web page or a slide rarely needs more than a few thousand pixels across.
The whole image turned transparent
The tolerance is so high that the subject's colour counts as background, or the picked colour is close to the subject. Lower the tolerance, or switch back to Automatic and check the swatch.
Nothing was removed
No edge pixel is within tolerance of the colour, so the fill never starts. This happens with a subject that fills the frame or with a picked colour that differs from the real backdrop. Check the swatch or pick the exact colour.
"The border is already transparent, so white is used"
The PNG already has a transparent margin, so there is no border colour to sample. If an opaque background sits inside that margin, pick its colour manually; the fill crosses the transparent margin to reach it.

Best practices

  • Shoot product photos for cut-outs with even light on the backdrop and a gap between the product and the edge of the frame. An evenly lit backdrop is one colour; a backdrop with a hot spot in the middle and grey corners is many.
  • Remove the background from the largest copy you have and scale down afterwards. Scaling first blends edge pixels and makes the fringe wider.
  • Keep the original file. The transparent PNG cannot give back the background it removed.
  • If the cut-out will sit on a dark background, test it on a dark background before using it, since a pale fringe is invisible on white.

Why the tolerance is measured as a distance

A threshold on brightness alone would treat a pale yellow and a pale blue the same as a pale grey, because all three can be equally light. Measuring the straight-line distance between colours in RGB space keeps hue in the comparison: #FFF5CC and #CCF5FF are the same distance from white, but each is a different distance from a cream backdrop, and the slider treats them accordingly.

RGB distance does not match human perception exactly. People notice small changes in green and in dark tones more than the same numeric change in blue or in light tones. For flat backgrounds that hardly matters, because the gap between backdrop and subject is usually large; it is one more reason to judge the preview rather than the number.

When to use a different approach

A colour key works when the background is one colour and the subject is clearly a different one. Hair, fur, smoke, glass and anything with a background that varies in colour need either a selection drawn by hand in an editor or software that models the subject, and this tool does neither.

  • Good fit: logos, icons, line art, signatures, screenshots of shapes, product shots on a plain sweep, scans on white paper.
  • Poor fit: portraits outdoors, pets, plants against sky, glassware, subjects that touch every edge of the frame.
  • Workable with care: products with soft shadows (crop the shadow or accept a rough edge), pale subjects on white (use a low tolerance).

Frequently asked questions

How exactly is the tolerance defined?

A pixel matches when its RGB distance from the colour to remove is at most the tolerance percentage of the largest possible RGB distance, which is the distance from black to white, about 441.7. At 20, any colour within 88.3 of the background matches. At 0, only the exact colour matches.

Why is the white inside my logo still there?

The fill only spreads from the edges of the image through touching pixels of the background colour. A white area enclosed by the logo is not connected to the edge, so it is treated as part of the logo. This is what keeps white details, such as a white highlight on a product, from being punched out.

Can I remove a background that is not white?

Yes. Automatic picks the most common colour on the border, whatever it is, and Pick a colour lets you set any colour yourself. A flat grey, black or green backdrop works the same way as white.

Why does the cut-out have a light outline on a dark page?

The pixels on the edge of the subject were drawn as a mix of the subject colour and the white background, and they stay as they are. A feather of 1 or 2 makes the outline less visible. Removing it completely needs edge colour correction in an image editor.

Is the result a real transparent PNG?

Yes. The download is a 32-bit PNG with an alpha channel. Removed pixels have zero opacity and feathered pixels have partial opacity, so it can be placed over any colour in a document, slide or web page.