Keeps the GIF's timing, fills transparent areas with a color you pick, and repeats the loop as often as you like.
Drag & drop a GIF, or
Animated GIF files of any size
This GIF to MP4 converter turns an animated GIF into an H.264 MP4 video. I built it because most converters run the GIF through a default FFmpeg command and stop there, and that command gets a few things wrong. Transparent areas come out white whether you wanted white or not, and the last frame gets cut short. The default output is also H.264 in 4:4:4 color, a format that iPhones, QuickTime, the Windows Photos app and many Android phones refuse to play. Force the common 4:2:0 format instead, and a GIF with an odd width like 201 pixels fails to encode at all.
Here the tool reads the GIF first, so it knows the frame size, how long every frame stays on screen, and whether the picture has transparent pixels. It then builds the video around those facts. Everything runs in your browser on your own device, the MP4 carries no watermark, and you don't need an account.
Drag it into the tool above or click browse. The file line shows its size, dimensions, frame count and how long one loop lasts. A sample GIF is there if you want to test first.
Choose how many times the loop repeats, and optionally a bigger 720p or 1080p frame. If the GIF has transparent areas, a background color option appears too.
The result panel plays the MP4 so you can check it, then gives you the file.
The conversion uses FFmpeg compiled to WebAssembly. The first time you convert, your browser downloads the converter (about 31 MB) and caches it, so later conversions on this site start right away. Most GIFs finish in a few seconds. A long GIF scaled up to 1080p takes longer, since every frame of a much larger picture has to be encoded.
The main reason is size. GIF compresses each frame on its own and stores at most 256 colors per frame, while H.264 stores only what changes from one frame to the next. My sample GIF above is 4.0 MB for about 3 seconds of 480×270 footage. As an MP4 from this tool it weighs 295 KB, about 93% smaller, and it looks the same. I go through the reasons in detail in why a 5-second GIF can be bigger than a 30-second MP4.
The second reason is where the file has to go. Many places that show "GIFs" actually play videos:
Converting yourself means you decide the background, the length and the size, instead of letting each app guess.
| In the GIF | In the MP4 |
|---|---|
| Frame delays (each frame can have its own) | A constant frame rate built from the shortest delay, with frames repeated so each one stays on screen as long as it did in the GIF. The total length matches the GIF exactly. |
| Delays of 0 or 0.01 seconds | Played as 0.1 seconds, which is how Chrome, Firefox and Safari show them. The MP4 runs at the speed you saw in your browser. |
| Transparent pixels | Filled with the background color you pick: white, black or green screen. |
| Odd width or height, like 201×151 | Padded by one row or column of the background color to 202×152. H.264 needs even dimensions, and padding keeps every original pixel sharp instead of stretching the picture. |
| The endless loop | The animation plays once, or 2, 3, 5 or 10 times in a row, as you choose. |
| 256-color frames | H.264 video in 8-bit 4:2:0, the format every phone, browser, TV and editor plays. |
| Sound | None. GIF can't store audio, so the MP4 has a video track only. |
The tool encodes with x264 at a constant quality setting (CRF 20) rather than a fixed bitrate. A simple meme with flat colors comes out tiny, and a GIF made from real footage gets the bits it needs. It also moves the MP4's index to the front of the file, so the video starts playing in a browser before it has fully downloaded.
A GIF doesn't have a frame rate. Every frame stores its own delay in hundredths of a second, so one frame can hold for 0.07 seconds and the next for a full second. A video, on the other hand, plays frames at a steady pace.
The tool finds the shortest delay in your GIF and uses it as the step for the video. A GIF with 0.07-second frames becomes a 28.57 fps MP4 where every GIF frame lasts exactly two video frames. If the GIF is slow, the tool repeats frames until the video reaches at least 24 fps, because some players and upload pipelines handle a 2 fps or 7 fps video badly. A repeated frame costs almost nothing in H.264, so the file barely grows.
It also adds the last frame's full delay to the end. A plain FFmpeg conversion stops the video the moment the last frame appears, so a GIF that pauses on its final frame loses that pause.
MP4 video has no transparency, so every transparent pixel has to become a real color. When you add a GIF, the tool decodes its first frame and checks for transparent pixels. The background option only shows up when it finds some, since an opaque GIF has nothing to fill.
GIF transparency is all or nothing for each pixel, so the edges of a transparent GIF were already hard before conversion. The MP4 keeps them exactly as they were.
A GIF loops forever on its own. An MP4 plays once and stops, unless the player loops it. A 1-second reaction GIF turned into a 1-second MP4 can feel like a flash on platforms that don't loop video, and some apps won't take a clip that short as a post.
The Repeat setting plays the animation 2, 3, 5 or 10 times back to back inside the MP4. The file line shows how long one loop lasts, so you can work out the count that gets a short GIF to the length you need. The repeats are exact copies, so the loop point stays seamless.
Most GIFs are small, often 480 pixels wide or less. On a phone that looks fine, but in a 1080p editor timeline or a full-screen player the clip shows up as a little box or gets stretched by the player with a soft, blurry filter.
The Size setting scales the GIF so its shorter side becomes 720 or 1080 pixels, using the Lanczos filter, which keeps edges crisper than the scaling most players do. The tool only offers sizes bigger than your GIF. The MP4 gets larger and the conversion slower: my sample came out at 1.3 MB at 720p, still about a third of the GIF's size. Scaling doesn't add detail that the GIF never had, though. If you want an AI model to rebuild sharper detail, convert to MP4 here first and then run it through the video upscaler.
If you have the original video, keep it as video. Turning a clip into a GIF throws away most of its colors and makes it many times heavier, and converting that GIF back to MP4 can't bring those colors back. This tool makes the MP4 look exactly like the GIF, not like the footage the GIF came from.
Going the other way, the MP4 to GIF converter trims and resizes a clip into a GIF for places that only accept GIFs. If you need to keep the file as a GIF but smaller, the GIF compressor shrinks it without changing the format.
Drop the GIF into the tool above and click Convert to MP4. The default settings play the animation once at its original size, and you can download the MP4 as soon as it finishes.
Not in any way you'd notice. The MP4 shows the same frames, colors and timing as the GIF. H.264 is a lossy codec, but the quality setting is high enough that the result looks like the GIF, while usually being many times smaller.
GIF stores every frame almost in full, and video stores only what changes between frames. For anything with motion, that difference adds up fast. Savings of 80% to 95% are common.
Not in an MP4, since H.264 video has no alpha channel. Pick green screen as the background and key it out in your video editor to get the transparency back there.
MP4 files don't store a loop setting the way GIFs do. Choose a Repeat count to build several loops into the video, or turn on looping in your player.
GIF files never contain audio, so there's nothing to carry over. Add music in your video editor or the app you post to.
Some GIFs set a frame delay of 0, which browsers slow down to 0.1 seconds and a few apps play as fast as they can. The MP4 follows the browser behavior, since that's how most people saw the GIF.
Yes. Open this page in Safari or Chrome on your phone, pick the GIF from Photos or Files, and save the MP4 when it's done.
I don't set one. The converter loads the whole GIF into your browser's memory, so the real limit is your device. Very large GIFs convert more reliably on a computer than on a phone.
No. Your browser reads the GIF and writes the MP4 on your own device, so the GIF stays there.