Skip to content

GIF to MP4 converter

An animated GIF is usually much heavier than the same clip as video, and many social sites and editors ask for MP4. This tool decodes your GIF frame by frame, with its exact timings, and encodes it to H.264 inside an MP4. You can pick a background color for transparent parts, double the size without blur and repeat the animation several times inside the video. Everything happens in your browser; the GIF is not uploaded.

Works anywhere in the world, wherever you are.

Turn a GIF into an MP4

The GIF is not uploaded: it is decoded and encoded to H.264 in your browser.

About this calculator

How it converts

The tool reads the GIF with its own decoder: it separates every frame, applies how the previous one is cleared or kept (the GIF89a disposal method) and keeps each frame's delay. Like browsers, frames marked 0 or 1 hundredths of a second are shown for 10 hundredths, so the video lasts as long as the GIF you see.

It then encodes those frames to H.264 with WebCodecs, on your device and with hardware acceleration when available, and stores them in an MP4 with each frame's duration. If your browser has no WebCodecs, it records the GIF in real time with the browser's recorder (MP4 if it can, otherwise WebM).

Transparency, size and loops

MP4 with H.264 can't store transparency, so transparent parts are filled with the color you choose: white, black or another.

“Double (sharp)” doubles the width and height by copying pixels, without smoothing: small or pixel-art GIFs stay crisp on big screens. H.264 needs even dimensions, so a GIF with an odd size gets one extra line in the background color.

An MP4 doesn't repeat by itself like a GIF, although many apps loop short videos. If you need it longer, choose how many loops of the GIF go inside the video.

How much smaller does it get?

It depends on the GIF: ones with photos or lots of motion usually shrink a great deal, because H.264 stores the differences between frames far more efficiently than GIF. A GIF with few colors that barely moves may shrink little. The tool shows the GIF's size and the MP4's so you can compare.

Important limitations

  • GIFs up to 100 MB, with a cap on the total pixels across all frames.
  • No transparency in the result: it's filled with a color.
  • With the fallback (no WebCodecs) it takes as long as the video lasts and may produce WebM.
  • A single-image GIF makes a still video.

Frequently asked questions

H.264 is lossy, but at the bitrate the tool uses the difference is hard to see. Since the GIF already has only 256 colors, the video can't hold more detail than the original.

Yes. Each frame lasts as long in the video as in the GIF, with the same rule browsers use for very short delays.

Because MP4 with H.264 doesn't support transparency. Choose the background color that best matches where you'll post it.

No. It is decoded and encoded in your browser; it never leaves your device.

This calculation runs in your browser and is never sent to a server. Your last values may be saved on your device only, for convenience. Results are estimates and are not financial, tax, accounting or legal advice.