Convert an Animated GIF to an H.264 MP4
Your GIF's frames are encoded into an MP4 with ffmpeg and libx264, keeping the animation's timing. Two things to expect: the video has no audio track, and MP4 has no loop setting, so it plays through once unless the player or platform repeats it for you.
Download Started!
How would you rate your experience with MiConvert?
Why convert GIF to MP4
An animated GIF stores a palette of at most 256 colors per frame and compresses each frame with LZW, with no motion compensation between frames. That design is nearly four decades old, and it is why a few seconds of animation can weigh more than a minute of video. H.264 in an MP4 container describes what changed between frames instead of re-describing every frame, so the same animation usually ends up far smaller, and it plays natively in browsers, on phones, in editing software and in the upload forms of sites that accept video but reject GIF.
MiConvert hands the GIF to ffmpeg on our servers and encodes with libx264 at the veryfast preset and ffmpeg's default quality setting, in yuv420p pixel format, with the moov atom moved to the front of the file so playback can start before the whole video has downloaded. No audio stream is created, because a GIF has no sound to carry. H.264 requires even pixel dimensions, so a GIF with an odd width or height has one row or column cropped; a 301 by 199 GIF becomes a 300 by 198 video.
What changes beyond that is worth knowing before you post the result. Transparency does not survive, because H.264 in this profile has no alpha channel, so anything see-through in the GIF is filled in. The MP4 carries no loop instruction, unlike GIF, so most desktop players stop at the last frame even though several social platforms loop short clips on their own. The animation's timing is carried over closely, but a GIF with wildly different delays between frames is fitted to video timing rather than reproduced delay for delay. And the encode cannot add color that was never there: a GIF that was already reduced to 256 colors stays banded, so the MP4 will not look better than the source, only lighter and smoother to play.
The people converting here are usually posting a reaction clip or a screen recording somewhere that wants video, dropping an animation into a timeline in Premiere or CapCut, or trying to stop a heavy GIF from slowing down a page or an email.
How to convert GIF to MP4
- Check that the GIF is actually animated. A single-frame GIF produces a video one frame long, which most players show as a still image.
- If the GIF has a transparent background, place it over the background you want in an editor first, since the MP4 cannot keep that transparency.
- Upload the GIF. Guests can send files up to 50 MB and 10 per batch; a free account raises the per-file limit to 100 MB, Plus to 200 MB and 25 files, Pro to 1 GB and 50 files.
- Start the conversion. The GIFs we see on this page typically finish within a few seconds of the upload completing.
- Download the MP4 within about 4 hours, then check it in a player. If you need it to repeat, set your player, embed code or video tag to loop, since the file itself does not request it.
What the encoder does
- ffmpeg with libx264, veryfast preset and ffmpeg's default quality target, in yuv420p for broad device compatibility
- Frame order and animation timing carried over from the GIF
- Faststart enabled, so the MP4 can begin playing before it has fully downloaded
- Odd pixel dimensions cropped by one row or column to satisfy H.264
- Silent output, with no empty audio track added
- Up to 10 GIFs per batch for guests and free accounts, 25 on Plus and 50 on Pro
Video Tutorial
Watch this step-by-step tutorial to learn how to convert GIF files to MP4 format online for free using MiConvert.com. No software installation required.
GIF to MP4 questions
Will the MP4 loop like the GIF did?
Not by itself. An MP4 has no loop flag, so the file plays once and stops. Looping has to come from the player: add the loop attribute to an HTML video tag, switch on repeat in VLC or QuickTime, or rely on platforms like X and Reddit, which loop short clips by default.
Can the MP4 keep a transparent background?
No. H.264 video as encoded here has no alpha channel, so transparent areas are filled with solid pixels. If transparency matters, keep the animation as a GIF or convert it to animated WebP instead.
Will the video look better than the GIF?
It will not gain detail. A GIF has already been reduced to 256 colors per frame, and converting cannot restore gradients that were dithered away. What you gain is a much smaller file and smoother playback, especially on phones.
Does the MP4 have sound?
No. GIF cannot store audio, so the output is a silent video with no audio stream at all. If you need music or narration, add it in a video editor afterward.
Can I choose the resolution, frame rate, bitrate or CRF?
No. This page runs a fixed encode: libx264, veryfast, ffmpeg's default quality, yuv420p, at the GIF's own dimensions rounded down to even numbers. If you need control over those settings, run ffmpeg yourself locally, where a command like ffmpeg -i in.gif -c:v libx264 -pix_fmt yuv420p out.mp4 does roughly what we do.
Why did the dimensions change by one pixel?
H.264 with 4:2:0 chroma needs even width and height. A GIF with an odd dimension has a single row or column cropped so the encoder accepts it. The visible content is otherwise unchanged.
How many GIFs can I convert at once, and how large?
Ten files per request as a guest or free user, 25 on Plus and 50 on Pro, with per-file ceilings of 50 MB, 100 MB, 200 MB and 1 GB respectively. Guests and free accounts are also limited to 10 conversion jobs per hour from one IP address. Each MP4 is downloaded on its own; there is no ZIP for a batch.
Where does the conversion happen and how long do you keep my files?
On our servers, not in your browser: the GIF is uploaded over HTTPS, converted by a worker, and the result is stored for download. Your uploaded GIF is deleted as soon as the job ends, and the MP4 is deleted automatically about 4 hours after it is produced. Anyone holding the random download link can use it during that window, so don't share it.