The quick way
Drop your animated GIF on the converter below. MP4 is already selected, so the conversion starts right away and the row shows the progress. When it is done, the row tells you the size of the video, its length and the number of frames, and how much smaller it is than the GIF. Click Download, or Download all as ZIP if you added several GIFs.
Two settings are worth a look before you download. Repeat puts the animation into the video several times, which helps where the player does not loop videos on its own. Background is the color used for transparent parts of the GIF, because MP4 cannot store transparency; pick the color of the page or slide where the video will be shown.
Try it here: GIF to MP4
Open the full tool pageWhy GIFs are so big
GIF was designed in 1987 for still images and simple graphics. Each frame is a picture of at most 256 colors, compressed with LZW, a lossless method that works well on flat areas and badly on anything with noise or gradients. An animation is just a list of these pictures. The best a GIF encoder can do is store only the rectangle that changed and mark unchanged pixels as transparent.
Video is different. When a GIF is made from a video clip, the clip has millions of colors, so the GIF encoder has to dither: it scatters pixels of the available colors to fake the missing ones. That noise changes from frame to frame and is almost impossible for LZW to compress, which is why a three second clip can weigh several megabytes.
A video codec such as H.264 is built for exactly this content. It predicts each frame from the previous one using motion vectors, stores only the difference, throws away detail the eye does not notice and keeps full color. The result is a file that looks smoother than the GIF and is usually far smaller.
- GIF: 256 colors per frame, lossless LZW, no motion prediction
- MP4 (H.264): full color, motion prediction between frames, adjustable quality
- WebM (VP9 or VP8): similar to MP4, made for web pages
How much smaller? Our measurements
We converted three kinds of GIF with the converter on this page in Microsoft Edge on Windows, using the default settings. The numbers show both sides of the story: GIFs made from photos or video shrink dramatically, while a small screen recording with few colors was already compact as a GIF.
Results depend on your browser, because the video encoder is part of the browser. In our tests MP4 was often smaller than WebM, even though VP9 is the more modern codec on paper.
| GIF | Size and length | GIF file | MP4 | WebM |
|---|---|---|---|---|
| Photo-like clip, dithered, 256 colors | 480 x 270, 48 frames, 2.9 s | 4.5 MB | 187 KB | 1,004 KB |
| Simple drawn animation | 400 x 260, 16 frames, 1.8 s | 17 KB | 6.8 KB | 13 KB |
| Screen recording, 64 colors | 640 x 400, 40 frames, 4 s | 27 KB | 43 KB | 65 KB |
What changes when a GIF becomes a video
Timing stays the same. Every frame is encoded with its own duration, so a GIF that pauses on its last frame for two seconds does the same as an MP4. Frames that the GIF marks with no delay at all play for 0.1 seconds, which is what browsers do with the GIF too.
Looping is no longer part of the file. A GIF carries its own loop setting, an MP4 plays once and the player decides whether to repeat it. Web pages, most social networks and many chat apps loop short videos anyway. For everything else, use Repeat to place the animation in the video 2, 3, 5 or 10 times.
Transparency is lost. MP4 and WebM videos made here are fully opaque, so transparent pixels get the background color you choose. If the GIF sits on a white page, white is right; on a dark slide, choose the slide color.
Size can change by a pixel. H.264 needs even width and height, so a GIF that is 375 pixels wide gets one extra column that repeats the edge pixels. Very small GIFs, under 32 pixels on a side, are enlarged by a whole factor because video encoders do not accept such tiny frames, and the pixels stay sharp. The video has no sound, just like the GIF.
Using the MP4 where you used the GIF
On a web page, a video with the attributes autoplay, loop, muted and playsinline behaves like a GIF: it starts by itself, repeats and shows inline on phones. Browsers only autoplay muted videos, which is not a problem here because the video has no sound. Swapping large GIFs for such videos is one of the simplest ways to improve page speed scores.
In PowerPoint, insert the MP4 with Insert, Video and turn on Loop until Stopped on the Playback tab. Social networks and messengers accept MP4 almost everywhere, often with higher size limits than for GIFs, and many of them turn uploaded GIFs into video themselves anyway.
If a platform only takes GIFs, you can go the other way: the Video to GIF tool turns an MP4 back into a GIF with a palette built from the clip.
When to keep the GIF
Email is the main case. Most email programs show animated GIFs but do not play videos inside the message, so newsletters still use GIFs. Some forums, older content systems and chat apps also accept images but not videos.
Small graphics with a few flat colors, such as animated icons, loaders or simple screen recordings, are often already small as GIFs, and the video may come out larger, as our measurements show. And if you need transparency, keep the GIF or convert it to animated WebP with the image converter, which keeps transparent pixels.