Skip to content

Convert GIF to MP4, free, in your browser

To convert a GIF to MP4, each frame of the GIF is read with its own timing and encoded as H.264 video, so the clip plays at exactly the same speed. The MP4 is usually several times smaller than the GIF, because video compression stores the differences between frames far more efficiently and is not limited to 256 colours. Use it when an app or site wants a video and not a GIF, or when a web page should load quickly.

A26GIF → MP4 — TabbyTools
Ready0 B sent to server

Your files never leave your device. Processing happens in your browser. How that works.

How it works

  1. Drop your GIFs onto the tool.
  2. Choose MP4 or WEBM, and how many times the animation should play.
  3. Download the videos, or all of them as a zip.

Runs as JavaScript inside this tab. Turn off your connection after the page loads and it still works.

GIF and video compared, and what the conversion keeps

GIF against MP4 and WEBM

GIF MP4 (H.264) WEBM (VP9)
Year 1987 2003 2013
Colours 256 per frame Millions Millions
Stores Each frame as a picture Changes between frames Changes between frames
Typical size for the same clip Largest Much smaller Much smaller
Transparency On or off per pixel None None in this tool
Sound None Possible (none is added here) Possible (none is added here)
Loops by itself Yes Up to the player Up to the player
Opens in Everything Everything Browsers, Android, most editors

Choose MP4 unless you have a reason not to. WEBM is for web pages and for apps that ask for it.

What is kept and what changes

What happens
Frame timing Kept exactly. Each GIF frame has its own time on screen and the video uses the same times.
Very fast frames A GIF frame set to under 20 ms is shown by browsers for 100 ms. The video uses 100 ms too, so it matches what you saw.
Size in pixels Kept. H.264 needs an even width and height, so an odd side is stretched by one pixel.
Colours Kept as they were; the video cannot bring back colours the GIF never had.
Transparency Filled with the background colour you choose.
Looping A video plays once. Use Play the animation to repeat the frames 2, 3, 5 or 10 times in one file.
A still GIF Becomes a 3-second video of that one picture.

One conversion makes at most 10 minutes of video. If repeating the animation would go past that, it is repeated fewer times and the tool says so.

Which codec you get

The tool asks your browser for H.264 when you choose MP4 and VP9 when you choose WEBM. Chrome, Edge and Safari on ordinary computers and phones have H.264. A browser without an H.264 encoder (some Linux builds, for instance) makes the MP4 with VP9 inside and tells you, because some apps will not play that; in that case WEBM is the cleaner choice.

Where a video is the better upload

Place Why
A web page A fraction of the download; use <video autoplay loop muted playsinline> to make it behave like a GIF
Instagram, TikTok They take video, not GIF files
Email and chat attachments Fits under size limits that the GIF would break
Slides PowerPoint and Keynote play MP4 smoothly at any size

Worked examples

The test GIF: 995 KB down to 21 KB

The automated tests use a 240 × 180 GIF of 30 frames, 3 seconds long, written the wasteful way most GIFs on the web are (every frame stored whole, 256 colours). It is 995 KB. As MP4 it is 21 KB, 98% smaller, and still 240 × 180 and 3.0 seconds. As WEBM it is 42 KB. A GIF that was already well compressed will shrink less than this.

Long enough to post

A 2-second GIF with Play the animation set to 5 times becomes a 10-second video. The tests check that playing the 3-second GIF three times gives a 9-second file.

An odd-sized GIF

A 301 × 201 GIF becomes a 302 × 202 video. H.264 cannot store odd sizes, so the picture is stretched by one pixel each way, which is not visible.

A sticker with a see-through background

Video has no transparency. Pick the background colour to match where the video will be shown: white for a document, black for a dark chat, or the page’s own colour.

For a web page

Choose MP4, then put it on the page as <video autoplay loop muted playsinline src="clip.mp4"></video>. It behaves like the GIF did and downloads far faster. Add a WEBM as a second <source> if you want the smallest file for browsers that prefer it.

A GIF with frames of different lengths

A GIF that holds its last frame for two seconds before repeating keeps that pause: the last frame of the video stays on screen for two seconds.

A still GIF

A one-frame GIF becomes a 3-second video of that picture. For a still, PNG or JPG is usually what you want; WEBP to PNG and the other image converters are linked below.

Frequently asked questions

Why is the MP4 so much smaller than the GIF?

A GIF stores each frame as a picture with at most 256 colours and simple compression. H.264 video describes how each frame differs from the one before, which takes far less data for the same motion.

An app says my video is too short. What can I do?

Set “Play the animation” to 3, 5 or 10 times. The frames are repeated end to end, so a two-second GIF becomes a video long enough to post.

What happens to a transparent background?

Video has no transparency, so see-through areas are filled with the background colour you choose, white by default.

Will the video loop like the GIF did?

A video file plays once; whether it repeats is up to the player or the site showing it. To get a longer clip, repeat the animation with the option above.

Which browsers does it work in?

It uses the video and audio codecs built into your browser. Current Chrome, Edge and other Chromium browsers on a computer support everything here. Other browsers may lack a particular codec; when that happens the tool says which one, instead of failing silently.

Is my file uploaded?

No. The file is read and converted inside your browser, using your own device. Nothing is sent to a server, which is also why there is no upload wait and no file-size limit beyond your device’s memory.

GIF → MP4 · last updated · changelog · part of Canned Tuna