Make GIF Transparent
This tool removes one solid background colour from a GIF and replaces it with real transparency. Click a pixel of the backdrop in the preview, or let the tool pick the corner colour for you, set how much near shades count with the fuzz slider, and choose whether the same colour inside your subject is protected. The output is a GIF whose background is the transparent index, with your subject's colours, frame delays and loop copied across exactly. It is colour keying, not an AI cutout: it works when the backdrop is one solid colour, and the honest limits are written out below.
1. Your GIF
…or drop a GIF file anywhere on this page.
Check the result on white and on black before downloading. A fringe that hides on one background often shows on the other.
Pick a GIF, drop one anywhere on this page, or load the sample.
2. Keying settings
Backdrop colour
The surest way: click the backdrop in the picture on the left. On load the tool picks the colour of frame 1's top left corner, which is the backdrop on most GIFs. The colour is read on frame 1 and applied to every frame, so the backdrop has to hold this one colour through the whole loop.
Fuzz (tolerance)
How far a pixel's colour may stray from the backdrop colour and still be removed, measured as a percentage of the largest possible colour distance (black to white). At 0 only the exact colour goes. Real backdrops are rarely perfectly flat, so 5 to 15 usually catches the near shades. Too much starts eating subject colours that live near the backdrop colour.
Scope: which matching pixels go
Everywhere removes every pixel that matches, including the same colour inside your subject. Edges only removes the matching colour that is connected to the frame's edge, so the same colour sealed inside the subject, a white shirt or a green sign on a green field, survives. Its price: a pocket of backdrop colour the subject fully encloses stays too.
Edge cleanup
Shrinks the clear area by whole pixels, eating the fringe of near-backdrop pixels that clings to the subject's edge. It is the only clean-up a GIF allows: a pixel that stays keeps its stored colour, so the fringe can be eaten into, never washed out. On thin lines and small text, 2 px can eat real detail, so check the preview.
What will happen
Load a GIF and its keying summary will appear here.
A worked example, measured
The sample built into the tool is a fixed file, a red ball bouncing on a flat green field: 320 x 200 pixels, 12 frames, 12,227 bytes. It was drawn with two test details on purpose. The ball carries a disc of the exact backdrop green at its centre, sealed inside the red, and a white highlight. With the backdrop colour picked from the corner (#00c800), fuzz at 10 percent and edge cleanup at 1 pixel, the two scopes give measurably different files:
- Everywhere: the output is 11,658 bytes with 3 colours left standing, and 88.8 percent of all pixels became transparent. The green disc inside the ball is gone with the backdrop, because this scope cannot tell the two greens apart.
- Edges only: the output is 12,230 bytes with 4 colours left standing, and 87.5 percent of pixels became transparent. The disc survives, still green, because no path of green pixels joins it to the frame's edge. The white highlight survives both scopes, because white is nowhere near the backdrop colour.
Those numbers come from runs of this page against that fixed file, and an independent check decodes both outputs and composites them over a contrasting background: the backdrop is gone, the ball and its highlight are intact, and the disc is present in one file and absent in the other, exactly as the scope promises. Open the sample and switch the scope back and forth: the disc appears and disappears in the preview.
How this tool works
Every frame of your GIF is first built up into a full picture, the way a player shows it. Each pixel of that picture is then compared with the backdrop colour you picked: the tool measures the Euclidean distance between the two colours in RGB space, and a pixel counts as background when that distance is within your fuzz setting, expressed as a percentage of the largest possible distance (black to white, about 441.7). In the Edges only scope, a flood fill walks in from the frame's border through matching pixels only, and just the pixels it reaches are keyed. The edge cleanup then grows the clear area by the number of pixels you chose. Only after all of that is the output palette built, from the pixels still standing, so the removed colour never wastes one of the 256 palette slots. Keyed pixels are written as the GIF's one transparent index, kept pixels keep their exact stored colours, and the frame disposal is set so each frame composites correctly over transparency, with no ghost of an earlier frame showing through the clear area. Delays and loop are copied, and the finished file is decoded and checked before it is offered to you.
What colour keying cannot do, stated plainly
- It is not an AI cutout. Nothing here guesses the outline of a person, a product or a pet. The tool removes a colour, exactly and only a colour, and that is why its results are predictable.
- The backdrop must be one solid colour. A green screen, a white product backdrop, the flat colour a cartoon GIF was drawn on: those key cleanly. A photo background of sky, shadow and texture is thousands of colours, and no fuzz setting separates it from the subject. Widening the fuzz just eats the subject.
- GIF transparency is all or nothing. A pixel is fully clear or fully solid, never half. Edges therefore come out hard and stair-stepped, where a PNG could fade them out softly. If you need soft edges, this format cannot give them to you.
- A halo of the backdrop colour can remain. The pixels along the subject's edge are blends of backdrop and subject. Fuzz and edge cleanup eat into them, but a kept pixel keeps its stored colour, so a faint coloured line can survive on some GIFs. Check the result on a white background and on a black one; the preview switch above the tool does exactly that.
- The two scopes trade one risk for another. Everywhere also takes the backdrop colour wherever it appears inside the subject. Edges only protects it, and in exchange a fully enclosed pocket of backdrop colour, a gap between an arm and a body, stays behind. Pick the scope that matches your picture, and step through the frames to check.
- The colour must hold across all frames. The backdrop colour is picked on frame 1 and applied to every frame. If the backdrop shifts colour mid-loop, a shadow falls across it, say, one fuzz setting has to cover both shades, and the wider setting may bite the subject. Step through the loop before downloading.
Frequently asked questions
How do I remove a white background without erasing white parts inside my subject?
Use the Edges only scope. It removes the white that is connected to the edge of the frame, walking in from the border through white pixels only, so a white shirt, a white highlight or white lettering sealed inside your subject is never reached and stays. The Everywhere scope cannot tell the two whites apart and removes both. One honest limit: if the white inside the subject touches the background white through even a one pixel wide path, the fill walks through it, and a fully enclosed pocket of background colour elsewhere stays behind for the same reason.
What does the Fuzz percentage do?
Fuzz is how far a pixel's colour may stray from the picked colour and still count as the background. This tool measures the distance between the two colours in RGB space and expresses the fuzz as a percentage of the largest possible distance, black to white. At 0 percent only the exact colour is removed. Real backdrops are rarely perfectly flat, so a little fuzz, 5 to 15 percent, usually catches the near shades around the edges. Raise it slowly: too much fuzz starts eating subject colours that merely live near the background colour.
Why does my GIF have a colored outline left after removing the background?
The outline is fringe: the pixels along the subject's edge are blends of the background colour and the subject colour, because that is how the GIF was drawn or compressed. GIF transparency is either fully clear or fully solid, with nothing in between, so those blended pixels cannot be made half transparent. They either stay, showing their stored colour as an outline, or go. Raising the fuzz a little catches more of them, and the edge cleanup setting eats one or two pixels into the subject to remove the line. A faint trace can still remain on some GIFs, because a pixel that stays keeps its stored colour exactly. Nothing on this page recolours it.
Can this cut out complex real-world photo backgrounds?
No, and this page will not pretend otherwise. Colour keying needs the background to be one solid colour, like a green screen, a white product backdrop or a flat colour a GIF was drawn on. A real world photo background is thousands of colours, shadows and textures, and no fuzz setting separates it from the subject: the fuzz would have to be so wide it eats the subject too. Cutting out photo backgrounds takes a different kind of tool that guesses the subject's outline. This tool does the one job it can do exactly, and says so.
Will the exported transparent GIF keep its frame timing and loop?
Yes. Only pixels change. Every frame keeps its original delay, the loop count is copied across unchanged, and the finished file is decoded and checked against those numbers before the download is offered. The frame count and the picture size stay the same too.
Are my GIF files uploaded to a server?
No. Everything runs in your browser using JavaScript. Your GIF never leaves your device, there is nothing to sign up for, and the tool works offline once the page has loaded. The limits are a file up to 50 MB and 500 frames.
Related tools
- GIF to WebP: WebP supports partial transparency and smoother edges than a GIF can hold. If your keyed GIF is headed somewhere WebP is accepted, converting it keeps the transparency in a smaller, more capable file.
- PNG to GIF: the way back. A transparent PNG sequence becomes an animated GIF, with the clear pixels carried into the GIF's transparent index.
- Add Image to GIF: once the background is clear, place the GIF over a new scene by layering it with an image, positioned and timed the way you want.
- GIF Frame Viewer: inspect the result frame by frame, with zoom, before you ship it, the surest way to catch a fringe or a pocket the key missed.