Convert GIF to MP4
Drop an animated GIF and get it back as an MP4 video, frame for frame and at the speed it plays in a browser. The MP4 is usually a small fraction of the size of the GIF, and it plays anywhere a video does.
The MP4 appears here once a GIF is open.
How to use it#
- Drop a GIF onto the box above, or click it to choose one.
- Choose what see-through areas become, and how many times the animation plays through.
- The MP4 is made straight away and made again when a setting changes. Play it in the preview, then download it.
Why turn a GIF into a video#
A GIF stores each frame nearly whole, in at most 256 colours. A video codec such as H.264 stores a full frame now and then and only what changed in between, so the same animation as an MP4 is often a tenth of the size of the GIF or less, and it can show far more colours.
Many apps and sites accept video but not GIF, as Instagram and TikTok do, or turn an uploaded GIF into a video anyway. Converting it yourself means you see the result before it is posted, and a smaller file uploads faster. H.264 in an MP4 plays on every phone, computer, and browser.
What carries over#
Every frame is kept, each for as long as it shows in a browser. GIFs that ask for a delay of a hundredth of a second or less are shown by browsers at a tenth of a second instead, and the MP4 uses the same timing, so it plays at the speed you are used to seeing.
The picture is encoded at a high bitrate, so flat colours and text stay clean. H.264 stores colour at half the resolution of brightness, which can soften single-pixel detail in pixel art at a close look. A GIF with an odd width or height gets one extra row or column of background, because H.264 needs even sides.
Transparency and looping#
An MP4 has no see-through pixels, so any transparent areas in the GIF are filled with white or black, whichever you choose. When no frame has any transparency, the choice greys out, because there is nothing for it to fill.
A GIF loops for ever, while an MP4 plays once and stops unless the player is set to loop. Play through repeats the animation up to ten times inside the MP4, which suits a short GIF on a site that wants a video of a few seconds. To go the other way, MP4 to GIF makes a GIF from part of a video.
Frequently asked questions#
What happens to transparency?
#
An MP4 cannot hold see-through pixels, so transparent areas are filled with the background you pick, white or black. Choose the colour of the page or chat the video will sit on. The choice greys out for a GIF with no transparent pixels.
Will the MP4 loop like the GIF?
#
Only if the player loops it. Most social apps loop short videos, and a web page can ask for a loop. To make the video itself longer, set Play through to repeat the animation up to ten times.
Why is the MP4 so much smaller than the GIF?
#
A GIF stores every frame nearly in full, while H.264 stores mostly what changed from one frame to the next. For an animation where most of the picture stays still, that is a large saving. The Size row shows the real figure before you download.
Is the quality the same as the GIF?
#
Very close. The MP4 is encoded at a high bitrate for its size, so it looks the same at normal viewing size. H.264 stores colour at half resolution, which can blur one-pixel details in pixel art slightly.
Why is it slow?
#
Every frame of the GIF is decoded and encoded again as H.264, and a GIF that plays through several times is encoded each time. Your file never leaves your device, so the work is done by your own computer or phone, inside this browser tab, not on a server built for it. Every frame is decoded and compressed again: a minute of 1080p at 30 frames a second is 1,800 pictures of about two million pixels each, and 4K has four times as many pixels. The browser hands the compression to your device's video chip where it has one, but each frame still passes through the tab, which shares the processor with everything else that is open. A phone also slows itself down as it warms up, and some browsers slow a tab you switch away from, so keeping this tab in front, closing other tabs, and plugging a phone in all help.
Is my GIF uploaded?
#
No. The GIF is decoded and encoded as an MP4 inside this browser tab, and nothing is sent anywhere.