webmmp4

GIF to MP4 converter

Turn a heavy animated GIF into a small MP4. The result is normally over 90 percent smaller and looks better, because MP4 is not limited to 256 colours.

Drop a GIF file here, or choose one

Converted on your device · nothing is uploaded · no size limit

An animated GIF is a stack of full images played in sequence. A video codec instead stores what changed between frames, which is why the same animation costs a fraction of the bytes as MP4. A 12 MB GIF routinely becomes a 700 KB MP4 that looks better.

This is why Twitter, Reddit, Imgur and Discord silently convert every GIF you upload into video behind the scenes. Doing it yourself first means faster page loads and less bandwidth on your own sites.

How to convert GIF to MP4

  1. Choose your file. Drag a GIF file onto the strip above, or click it to browse. The first file also loads the converter itself, which takes a few seconds.
  2. Wait for the bar to fill. Encoding runs on your own processor. A one-minute 1080p clip usually takes under a minute; keep the tab open while it works.
  3. Download the MP4. The finished file appears as a download button and saves straight to your device.

Why convert GIF to MP4

Dramatically smaller

Reductions of 90 to 98 percent are normal. The saving is largest on long GIFs and on footage with a lot of movement.

More colours, less banding

GIF holds 256 colours per frame. H.264 handles millions, so gradients and video footage stop looking dithered and blocky.

Better for Core Web Vitals

A large GIF above the fold is a common cause of a poor Largest Contentful Paint score. Replacing it with an autoplaying muted video usually fixes that outright.

Behaves like a GIF on the web

Give the video element the autoplay, muted, loop and playsinline attributes and it will play silently and continuously, exactly as the GIF did.

Typical results from a 10-second animation

Typical results from a 10-second animation
GIFMP4
File size8–12 MB300–800 KB
Colours256 per frameFull colour
SoundImpossibleSupported (none here)
Autoplay and loopAutomaticNeeds HTML attributes
Pastes into chat appsEverywhereAlmost everywhere

Doing it yourself with ffmpeg

If you convert files regularly, or need to process a whole folder, run it locally instead. This is the same operation the tool above performs:

ffmpeg -i input.gif -movflags +faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -crf 23 output.mp4

Every flag is explained in the guide to the ffmpeg command.

Questions

Will it still loop by itself?

In a web page, yes, once you add the loop and autoplay attributes to the video element. Opened directly in a media player it behaves like any other video and plays once.

Why does the video have no sound?

Because GIF cannot store audio, there is nothing to carry across. The output is a silent video.

Does the animation speed stay the same?

Yes. Per-frame timing from the GIF is read and reproduced. Very old GIFs with irregular frame delays can drift slightly, which is a limitation of how those files were authored.

Why the scale filter in the command?

H.264 requires even pixel dimensions. Many GIFs have an odd width or height, which would cause the encode to fail outright, so the filter rounds down by a pixel where necessary.

Can I convert back to GIF?

Yes, though you will lose colour depth again. The WebM to GIF page handles video-to-GIF conversion.

Is the file uploaded?

No. Everything happens in your browser.

Other conversions