Video to GIF Converter
GIF is a 1987 image format that became the internet standard for short looping animation despite being comprehensively bad at it. It survives because it plays everywhere, autoplays silently, and can be pasted into places that reject video. Conversion runs here in WebAssembly.
How to use it
- Drop in an .mp4, .mov, or .webm clip. Keep it short.
- FFmpeg loads as WebAssembly and samples the video at 10 frames per second, scaled to 320 pixels wide.
- The .gif downloads when conversion completes.
The 256-colour ceiling
A GIF frame can use at most 256 distinct colours, drawn from a palette stored in the file. Video routinely contains tens of thousands of colours in a single frame, so conversion always involves discarding the vast majority of them.
The visible result depends on content. Screen recordings, terminal sessions, line art, and animation with flat colour fills convert well, because they genuinely use few colours. Camera footage, anything with a gradient, and skin tones convert badly, showing visible banding where a smooth transition has been forced into a handful of steps.
Dithering can disguise banding by scattering pixels between adjacent palette colours, but it does so by introducing noise, and noise is precisely what defeats the compression GIF relies on. The dithered version looks smoother and can be several times larger.
Why the GIF is bigger than the video
This is the fundamental problem with the format. Modern video codecs encode motion: a frame is stored as the differences from the previous frame plus a description of how blocks of pixels moved. That is enormously efficient for typical footage.
GIF has none of that. Each frame is compressed on its own with LZW, an algorithm designed for static images in the 1980s, with only a basic ability to skip unchanged regions. There is no motion compensation and no temporal prediction.
The consequence is routine: a 2 MB MP4 becomes a 15 MB GIF that looks worse. To keep the output manageable, conversion here samples at 10 frames per second and scales to 320 pixels wide. Both are aggressive reductions, and both are necessary.
Keep clips short, and consider not using GIF
At 10 frames per second and 320 pixels wide, a three to five second clip produces a file in the low megabytes. Ten seconds is pushing it. Thirty seconds will produce something too large to be useful and may exhaust browser memory during conversion.
It is worth asking whether you need a GIF at all. An MP4 or WebM with the autoplay, loop, muted, and playsinline attributes gives you silent looping playback that works in every browser, at a fraction of the size and with far better quality. Every major platform that historically served GIFs, including Giphy and Imgur, quietly converts them to video behind the scenes for exactly this reason.
GIF remains the right answer when the destination will not accept video: some chat clients, some documentation platforms, email, and issue trackers that render images but not video elements.
At a glance
| Accepted input | .mp4, .mov, .webm |
|---|---|
| Output | .gif at 10 fps, 320 pixels wide |
| Colour depth | 256 colours per frame, a format limit |
| Recommended length | Under about five seconds |
Frequently asked questions
Why is my GIF larger than the video it came from?
GIF compresses each frame independently with a 1980s algorithm and has no motion compensation. Video codecs store only what changed between frames. The size difference is inherent to the formats.
Can I get a higher frame rate or larger size?
The output is fixed at 10 fps and 320 pixels wide, because raising either produces files too large to be practical. If you need better motion and resolution, use a looping muted video element instead.
Why does my footage look banded and blotchy?
GIF allows 256 colours per frame. Camera footage and gradients contain far more, so smooth transitions collapse into visible steps. Screen recordings and flat-colour animation convert much better.
What length of clip works?
Three to five seconds is the sweet spot. Beyond about ten seconds the file becomes unwieldy, and long clips can exhaust browser memory during conversion.
Read more
Audio and video: containers, codecs, and transcoding — An MP4 is not a format, it is a box. Knowing what is in the box explains most media conversion behaviour.