How to convert a GIF to MP4
- Load a GIF. Drop it on the box above, paste it, or pick a file, or try everything on the built-in sample first.
- Read the support box. It has already checked your browser. It tells you whether you are getting a real MP4, a WebM labelled as WebM, or an honest explanation of why this browser cannot encode video at all.
- Choose the plays, the background and the quality. The readout updates with the exact plan: the output dimensions, the length in seconds, and what will happen to any transparent pixels.
- Convert and download. The encoding runs in your browser, frame by frame. The finished video then plays above, from the actual file, and the status line reports its real size next to the original GIF.
The settings, one by one
Plays written into the video exists because an MP4 has no loop setting. A GIF carries its looping inside the file; a video does not, so the only way to make a video run the animation three times is to put the animation in three times. Pick a number, or let As the GIF loops read the GIF's own setting. Background colour decides what transparent pixels become, because video cannot be see-through: white, black, or any colour from the picker, applied to every frame. Quality sets the encoder's bitrate, calculated from your GIF's dimensions and speed: High spends more bits for a sharper picture, Smaller file spends fewer and accepts some softness. The silent audio track adds a track of pure silence, there purely because some uploaders refuse a video that has no audio track at all.
What changes when a GIF becomes a video
Four things change in the conversion, and none of them should be a surprise found later. Looping leaves the file. The GIF's loop setting cannot be carried into an MP4, because the format has no such setting; the plays setting above is the replacement, and players add their own looping on top. Transparency ends. Every see-through pixel is flattened onto your chosen background colour. Odd dimensions gain a pixel. Video stores colour at half resolution, which needs even width and height, so a 161 by 121 GIF becomes a 162 by 122 video: one row or column of the background colour at the edge, with the picture itself never scaled or cropped. Fine coloured detail can soften slightly. That same half-resolution colour storage means a one-pixel coloured line on a contrasting background may come out a touch softer than in the GIF. Flat colours, text with some body to it, and ordinary footage style GIFs are unaffected in any way you would notice.
What does not change: the order of the frames, the timing of the frames, the dimensions of the picture, and the fact that the file is made on your device. Nothing is uploaded at any point.
Timing: every frame on its own timestamp
A GIF is not a frame rate. Each frame carries its own delay, and real GIFs mix them freely: a pause of 200 ms here, two quick 50 ms frames there. A converter that forces the whole animation onto one frame rate has to round those delays, and the result plays at a slightly wrong speed, with the pauses in the wrong places. This tool hands the encoder each frame with its own start time and its own duration, taken from the file, so the video's rhythm is the GIF's rhythm. We check this the hard way: the converted file is pulled apart again and every frame's timestamp and duration in it is compared against the schedule the GIF's delays called for.
One rule applies, and it is the browsers' own, not ours: a stored delay of 0 or 10 ms is not honoured by players, which show such a frame for 100 ms instead. The video does the same, the facts box above your settings counts any frames of yours it touches, and every other delay is carried across exactly.
Which browsers get a real MP4, and what the others get
The conversion uses your browser's built-in video encoder, a browser feature called WebCodecs, plus a small JavaScript program that writes the MP4 container around the encoded frames. Whether a true MP4 is possible depends on the encoder your browser and operating system provide, so the tool asks, for your exact output size, before it promises anything. Current Chrome, Edge and Safari answer yes to H.264 and get a real MP4. Desktop Firefox gets one where the operating system gives it an H.264 encoder to call. A browser with only VP9 or VP8 encoding is offered a WebM video instead: a good format, honestly labelled, never renamed to .mp4 to look like something it is not. And a browser with no video encoding at all is told so, plainly, with no file produced. The support box at the top of the tool shows which of these is yours.
A worked example, with real numbers
These figures are from converting an actual 12-frame test GIF we made for this page, through this tool, in a Chromium browser at the Balanced quality setting: 160 × 120 pixels, 4,407 bytes, delays between 50 and 200 ms, 1.20 seconds per loop, looping forever. It is the same scene as the built-in sample.
- 1 play: the MP4 is 5,004 bytes and 1.20 seconds long. Yes, that is bigger than the 4,407-byte GIF, by 597 bytes. The next paragraph explains why, because it is the honest headline for a clip this small.
- 3 plays: the MP4 is 14,713 bytes and 3.60 seconds long, the length an Instagram upload needs.
- As the GIF loops (10 plays, because this GIF loops forever): the MP4 is 49,500 bytes and 12.00 seconds long. Every play is encoded in full, so the file grows in proportion to the plays.
- The timing, checked: pulled apart again, the 1-play file's 12 frames carry durations of 100, 50, 50, 100, 200, 100, 50, 50, 100, 100, 200 and 100 ms, the GIF's own delays, in the GIF's own order.
Why is the MP4 not smaller here, when everyone says MP4 is the smaller format? Because a video codec earns its savings by predicting each frame from the frames around it, and a 12-frame, 1.2-second clip gives it almost nothing to predict from, while the file still pays for a full first frame and the container around it. The savings are real on the GIFs people usually convert: longer, larger, footage-like animations with many similar frames in a row. On a tiny clip like this one, converting is about compatibility, getting a file that posts and plays everywhere, not about bytes. When bytes alone are the problem and the format can stay GIF, that is the GIF Compressor's job.
MP4, WebM or keep the GIF?
MP4 when the destination is a feed, a chat app, a presentation or anywhere that treats a GIF as an attachment but a video as content: this page, in a browser that can encode H.264. WebM when the destination is the open web and file size matters most, or when your browser offers nothing else; this tool produces it as the fallback and labels it honestly. Keep the GIF when the picture needs real transparency, when it is a small reaction loop that will be embedded as an image, or when the file is already tiny. And prepare the GIF before converting when it needs it: crop away the edges that should not be there, or resize it to the dimensions the destination actually wants, because the video will inherit whatever the GIF has.
How big a GIF can you convert?
There is no server limit, because there is no server. But your browser's memory and its encoder are real limits, so the page states them plainly: files up to 50 MB, up to 600 frames, up to 48 million decoded pixels in total (frames × width × height), and up to 3,600 frames written into one video once the plays are multiplied in. The checks run on the file's structure before a single frame is decoded, so an oversized GIF is refused up front with the reason, not with a frozen tab halfway through an encode.
Frequently asked questions
Will the MP4 loop like a GIF?
Not by itself. An MP4 file has no loop setting inside it; looping is the player's decision, and many players do loop short clips on their own. What this tool can do is write the animation into the file more than once: pick 2, 3, 5 or 10 plays, or As the GIF loops, and the video simply runs that many times before it ends. A GIF set to loop forever cannot be matched literally, because a video file has to end somewhere; here it becomes 10 plays, and the readout says so before you convert.
Will the MP4 video have sound?
Only silence, and only if you ask for it. A GIF carries no sound, so there is nothing to convert; by default the MP4 has no audio track at all. The one exception is the silent audio track option: some uploaders, Instagram among them, sometimes reject a video that has no audio track, so the tool can add a track of pure silence. It adds no music and no noise; it just makes the file acceptable to a picky uploader.
What happens to transparent GIFs?
The see-through pixels are flattened onto one background colour, because MP4 video has no transparency at all. You pick the colour here, white by default, and the readout names it before you convert. This is also the answer to the black borders people find after converting elsewhere: those tools flattened onto black without saying so. If your GIF has a transparent background and you want it on your page's colour or your brand colour, set that exact colour with the picker instead of accepting a default.
How do I convert a GIF to MP4 for Instagram?
Load the GIF, set the plays so the video runs at least 3 seconds (a 1.2 second GIF needs 3 plays), and switch on the silent audio track, because Instagram sometimes rejects videos that have none. Then convert and download. Instagram loops short clips itself once they are posted, so you do not need a huge number of plays; you need the length and the audio track. If the GIF has transparency, remember it will sit on the background colour you picked, so choose the colour you want behind it in the feed.
How do I convert a GIF to MP4 on iPhone?
Open this page in Safari on an iPhone running a current iOS (Safari 16.4 or later is where Apple added the video encoding this tool uses), load the GIF from your photos or files, and convert. Everything happens in the browser on the phone, nothing is uploaded, and the finished MP4 downloads like any other file. If the support box at the top of the tool says your browser cannot encode H.264, the iOS version is the usual reason; updating iOS is the fix.
Does the video keep the GIF's speed?
Yes, frame by frame, not as one averaged frame rate. Each frame of the GIF is placed in the video at its own start time and shown for its own stored delay, so a frame the GIF holds for 200 ms is a 200 ms frame in the video, and a 50 ms frame stays 50 ms. One rule applies, the same one browsers use when they play the GIF itself: a stored delay of 0 or 10 ms is shown as 100 ms, because players will not honour anything that fast. The facts box above names any frames that rule touches in your GIF.
Is my GIF uploaded?
No. The decoding, the encoding and the file writing all happen in your browser, on your device, using its built-in video encoder. Your GIF is never sent anywhere, which is also why the tool works on a slow connection once the page has loaded, and why the limits are about your device's memory rather than a server's rules. You can check this in your browser's network tools: converting produces no upload traffic.
Which browsers can make a real MP4 here?
Current Chrome, Edge and Safari can encode H.264 video in the browser, so they get a true MP4. Desktop Firefox can too, where the operating system provides an H.264 encoder for it to use. Where no H.264 encoder exists, this tool offers a WebM video instead, labelled WebM, with the same timing, and where no video encoding exists at all it says so and makes nothing. The box at the top of the tool checks your actual browser and tells you which of these you are getting before you convert, so the answer never depends on a chart like this one.
Related tools
Converting is usually one step in a longer job. These MotionGIF tools cover the steps that tend to come before or after it:
Crop GIF
Cut away the edges of an animated GIF to exact pixels before you convert it, so the video does not carry the screen recording border or the empty space with it.
Open the tool →Resize GIF
Scale the whole picture up or down first, when the destination wants specific dimensions: the video inherits the GIF's size, so set it before you convert.
Open the tool →GIF Compressor
Make a GIF file smaller in bytes while it stays a GIF, with a target file size mode: the right tool when bytes are the whole problem and no format change is needed.
Open the tool →