How to convert GIF to MP4
Converting a GIF to MP4 takes one click:
- Choose or drop the GIF (up to 100 MB).
- Press Convert to MP4. The video keeps the GIF's pixel size and frame timing.
- Compare the sizes in the readout, then download the MP4 or save it to Photos.
Why an MP4 is so much smaller than a GIF
GIF compresses each frame on its own with LZW, a lossless method from the 1980s designed for drawings. Every frame of a GIF is essentially a full picture. MP4 video, encoded here with H.264, works differently: it predicts each frame from the previous ones and stores only what moved and changed. Most frames of an animation are almost identical to the one before, so the savings are huge.
H.264 also has full color, so it does not need dithering patterns, which are noisy and compress badly. The result: GIF to MP4 conversions commonly come out 5 to 10 times smaller, and screen recordings or cartoons with large still areas can shrink even more. The readout after converting shows the exact saving for your file.
When to convert a GIF to video
A GIF to MP4 converter is worth using whenever the place you post to accepts video:
- Social networks: X (Twitter), Instagram, Facebook and LinkedIn play video natively and often convert uploaded GIFs anyway; uploading an MP4 gives you control over quality.
- Websites: a muted, looping, autoplaying video element loads much faster than a large GIF and improves page speed scores.
- Messaging: an MP4 sends faster on mobile data and stays sharp where some apps would recompress a GIF.
- Editing: video editors import MP4 directly, so you can add sound, captions or combine the animation with other clips.
What changes, and what stays the same
The MP4 has the same frames and the same timing as the GIF. Two things change, both for compatibility. The width and height are rounded up to even numbers, because the standard H.264 color format needs them. And transparent areas become white, because MP4 video has no transparency. If your GIF relies on a transparent background, keep the GIF for that use.
Loops: a GIF loops by itself, an MP4 plays once unless the player loops it. On a website, add the loop, muted, autoplay and playsinline attributes to the video tag; social networks loop short videos automatically. There is no sound in the result, since a GIF has none.
Using the MP4 instead of a GIF on a website
If you run a website, swapping a heavy GIF for an MP4 is one of the easiest speed wins. A video element with the autoplay, loop, muted and playsinline attributes behaves just like a GIF: it starts on its own, loops silently and plays inline on iPhone instead of opening full screen. Browsers only allow autoplay for muted video, which is why muted is required.
Because the MP4 is a fraction of the GIF's size, the page loads sooner, uses less mobile data and scores better in speed tests such as Google's PageSpeed Insights, which flags large animated GIFs and recommends video formats instead. Add width and height attributes so the layout does not jump while the video loads, and a poster image if you want something to show before the first frame arrives.
Quality of the converted video
The MP4 is encoded with x264 at a constant quality setting (CRF 23, the encoder's own default), which keeps edges and text clean for the kind of content GIFs usually hold. Because the GIF was already limited to 256 colors, the video does not lose anything visible: it reproduces the GIF's frames, dithering included. Converting the MP4 back to a GIF later works too, though each conversion is a new encode, so keep your original GIF if you may need it again.
Going from video to GIF instead
Need the opposite? The MP4 to GIF converter turns a clip into a GIF with a palette tuned to the footage, and video to GIF covers WebM, MKV and AVI. Both run on the same engine as this page. The guide on how to convert MP4 to GIF also lists the FFmpeg command for GIF to MP4 if you prefer the command line.
Private and free
The GIF never leaves your device: FFmpeg runs in your browser as WebAssembly, encodes the MP4 with x264 and hands the file straight back to you. There is no account, no watermark and no limit on how many GIFs you convert. The first conversion downloads the 31 MB converter once.
GIF to MP4 FAQ
How much smaller will my MP4 be?
Usually 5 to 10 times smaller than the GIF, sometimes more for screen recordings and cartoons. The tool shows the exact difference after converting.
Does the MP4 loop like the GIF?
The video plays once by default. Websites can loop it with the loop attribute, and most social apps loop short videos automatically.
What happens to transparent GIFs?
MP4 has no transparency, so transparent areas become white.
Will the MP4 play on iPhone and Android?
Yes. It is H.264 in an MP4 container with the yuv420p color format, which every phone, browser and social network supports.
Is there a size limit?
GIFs up to 100 MB. Larger GIFs are rare and take a long time to decode in a browser.