GIF to MP4

Turn a GIF into an MP4 or WebM video that is up to 10 times smaller and plays smoothly.

loading GIF to MP4
About this tool

How do I convert a GIF to MP4?

Converting a GIF to MP4 turns an animated image into a video file with the same pictures, and the video is usually much lighter. A GIF stores every frame almost as a separate image limited to 256 colours. An MP4 uses video compression (H.264), which stores mostly what changes from one frame to the next. For the same clip that often means a file several times smaller, with full colours and smoother playback.

Use it when a GIF is too heavy to send or to put on a web page, when a site or app (an upload form, a presentation tool, a social network) wants a video, or when you want to trim and edit the animation with video tools such as Trim video. The tool can also write WebM (VP8), an open format that browsers play inside a page.

The conversion runs in your browser with FFmpeg compiled to WebAssembly. The engine is about 32 MB, downloads from this site the first time and stays saved for later visits. Your GIF is never uploaded, and there is no watermark, no account and no queue.

How to turn a GIF into a video

  1. Drop a GIF on the page or pick it with the button. Only .gif files are accepted. An example GIF is loaded first so you can try the settings.
  2. Choose the Format: MP4 (H.264), which plays almost everywhere, or WebM (VP8), an open format that is often smaller and fine for web pages.
  3. Choose the Quality: Smallest file, Balanced (default) or High quality.
  4. Click Convert to video. The first time, the engine downloads before the work starts; a progress bar follows the conversion.
  5. Download the video. It keeps the name of the GIF with the new extension (demo.gif becomes demo.mp4). The size is compared with the original, so you see how much you saved. With several GIFs you can download them all as a ZIP.

Examples

Put a GIF on a web page without a heavy download

hero.gif, 960 x 540, 6 seconds, 8 MB. Choose MP4, Balanced. The video keeps 960 x 540 and the frame rate of the GIF, and is typically a small fraction of the size. Use it in your page like this, so it plays on its own and repeats like a GIF:

<video src="hero.mp4" autoplay loop muted playsinline></video>

A video does not loop or autoplay by default: those attributes (muted is required for autoplay in most browsers) give the GIF behaviour back.

Send a screen recording to a client by email

bug-report.gif, 1280 x 720, 25 MB, too big for most email limits. Choose MP4, Smallest file. Flat interface colours compress very well in video, so the result usually fits where the GIF did not.

A GIF with an odd size

logo-anim.gif, 333 x 251. Video encoders need even dimensions, so the tool rounds both sides down to even numbers: the MP4 is 332 x 250. You lose at most one pixel row and one column.

WebM for a modern site

loop.gif, 500 x 500, 3 seconds. Choose WebM (VP8), High quality, and use both files on your page with two <source> tags (WebM first, MP4 as fallback) to cover old browsers.

Common errors and how to fix them

  • "... is not a supported file for this tool.": only .gif files are read. To convert a video from one format to another, use Video convert.
  • The video has no transparency: GIF can have transparent areas; MP4 and WebM (as made here) cannot. Transparent pixels turn into a solid background. If you need a transparent animation, keep the GIF or use GIF to frames.
  • It does not loop when I use it: a video file plays once unless the page asks it to repeat. In HTML add loop; in chat apps that play videos as GIFs it usually repeats by itself.
  • The browser ran out of memory: very long or very large GIFs can fill the memory of a phone. Convert one file at a time and close other tabs.
  • Banding or blur at Smallest file: choose Balanced or High quality; the lowest setting trades detail for size.
  • The engine download fails: check your connection and click Try again; what already arrived is kept.

GIF or MP4: which one should I use?

Is MP4 smaller than GIF?

Usually yes, often by a wide margin, up to around ten times smaller in good cases. Long clips with photographic content benefit most. Tiny, simple animations of a few frames can be as small as a GIF, so compare the sizes the tool shows.

Is there quality loss when I convert a GIF to MP4?

Video compression is lossy, but a GIF has only 256 colours per frame, so the source is already limited. At Balanced or High quality the video looks the same as the GIF to the eye. Smallest file trades some detail for size.

MP4 or WebM?

MP4 with H.264 is the safest choice: phones, chat apps, editors and every browser play it. WebM with VP8 is open, often smaller at the same look and is fine on modern browsers, but some older software and Safari versions do not play it.

Does the video have sound?

No. A GIF has no audio, and the tool writes the video without an audio track.

Why does my video not autoplay?

Browsers only autoplay videos that are muted, and need autoplay, muted and playsinline. Add loop to repeat it like a GIF.

Can I make a GIF from a video again?

Yes, with Video to GIF; to shrink an existing GIF without changing format, use Compress and resize GIF.

Is it free and private?

Yes. It is free, runs in your browser, and the file never leaves your device.

Report a problem