How to Make a Transparent GIF from a Video
Last updated: · Written by the RenderAlpha team
Facts checked against the sources below on November 9, 2026. Commands and file sizes measured on FFmpeg 9.0.2 with a 5 second 1280×720 test clip.
A transparent GIF is a short animation with no background box, so it sits cleanly on a page or in a chat. To make one from a video you remove the background first, then save the result as a GIF. The catch is that GIF transparency is on or off, which changes how you should prepare the clip.
Short answer
Remove the background, then save as GIF. A GIF pixel is either fully transparent or fully solid, so soft edges become hard and need blending with the page color to avoid a white outline. Our 5 second test clip became a 2.2 MB transparent GIF at 480 px and 15 fps, and 431 KB at 240 px and 10 fps.
What a GIF can and cannot do
MDN describes GIF transparency this way: pixels are opaque unless a specific color index is designated as transparent, in which case pixels of that color are entirely transparent. There is no in-between, so hair, motion blur and glass, which rely on partly transparent pixels, come out hard-edged.
MDN also lists GIF palettes as holding up to 256 entries, so each frame is limited to 256 colors. For soft edges or full color, export a transparent WebM or ProRes 4444 instead; the format comparison shows the trade-offs.
Step 1: pick a clip that works as a GIF
Choose a few seconds with a clear subject and good contrast against its background. Fast motion, thin hair and semi-transparent objects are hardest to keep clean. Keep it short, because size grows with every second.
Step 2: remove the background and export as GIF
Upload an MP4, MOV, WebM or an existing GIF to the transparent GIF maker, check the cutout on one frame for free, then choose transparent GIF. GIFs are scaled down to at most 720 px on the longest side, and a GIF upload costs 1 credit. A video is billed per second like any other export.
Because edge pixels cannot be partly transparent, they are blended with a color first. The option called Smooth the edges for lets you say whether the GIF will go on a light page, a dark page or another color. The GIF stays transparent; only the edge blending changes. See removing the background from a GIF for how the edge blending works.
Make it yourself with ffmpeg
If you already have a transparent WebM, ffmpeg can build the GIF. Put -c:v libvpx-vp9 before the input so ffmpeg reads the alpha channel. We ran this on FFmpeg 9.0.2 and read back the top-left pixel of the result: alpha 0, so it is transparent. When we left out -c:v libvpx-vp9, the same pixel came back opaque and the file grew from 2.2 MB to 5.3 MB, because the native VP9 decoder ignores alpha. For the other conversion commands see converting MOV to a transparent WebM, and for the web version of the same clip see how to create a transparent WebM.
ffmpeg -c:v libvpx-vp9 -i input.webm -vf "fps=15,scale=480:-1:flags=lanczos,split[a][b];[a]palettegen=reserve_transparent=1[p];[b][p]paletteuse=alpha_threshold=128" -loop 0 output.gifMake the file smaller
The same 5 second clip, converted with the command above at different sizes and frame rates, gives these file sizes. Frame rate and width matter more than anything else.
Slack’s help page says custom emoji images work best under 128 KB and that GIFs can include up to 50 frames. Even our smallest 5 second GIF is above 128 KB, so an emoji needs a much shorter loop and a smaller size than the table shows.
| Width | Frame rate | File size (5 s clip) |
|---|---|---|
| 480 px | 15 fps | 2249 KB |
| 320 px | 12 fps | 866 KB |
| 320 px | 10 fps | 722 KB |
| 240 px | 10 fps | 431 KB |
Fix the white outline
A pale halo around the subject means the edge blending color does not match the background the GIF sits on. Re-export with the page type that matches where it will be shown. If the GIF must work on both light and dark backgrounds, use a transparent WebM on the web, or send a short MP4 on a solid color.
Frequently asked questions
Can a GIF have partial transparency?
No. MDN describes GIF transparency as a single color index that is entirely transparent, so each pixel is either transparent or opaque.
Why does my transparent GIF have a white outline?
Soft edge pixels cannot be partly transparent, so they are blended with a color first. The outline shows when that color does not match the page behind the GIF. Re-export for the right page type.
How many colors can a GIF have?
MDN says each GIF palette has up to 256 entries, so a frame is limited to 256 colors.
How big can a GIF be for a chat emoji?
Slack’s help page says custom emoji images under 128 KB work best and that GIFs can include up to 50 frames. Our 5 second test GIFs were all larger than that, so use a short loop and a small size.
Why did my ffmpeg GIF lose its transparency?
Put -c:v libvpx-vp9 before the input when the source is a WebM. In our test, leaving it out made the output opaque, because the native VP9 decoder ignores alpha.
Sources
Primary sources we checked. The date is when we last opened each page.
- MDN: Image file type and format guide: GIF transparency and palette size (Retrieved )
- W3C: Graphics Interchange Format version 89a: color tables and per-image local color tables (Retrieved )
- Slack: Add custom emoji and aliases to your workspace: 128 KB guidance and 50 frames (Retrieved )