Start a project

Tool 75 of 194 · Images

GIF to MP4 & WebM Converter

Turn a heavy animated GIF into a video a fraction of the size, without uploading it anywhere.

GIF to MP4 & WebM Converter

Your GIF

The sample is a 30-frame pan across Malham limestone pavement (photo by Paul Morris, CC0, via Wikimedia Commons).

GIF (first frame)

The original GIF

Video

The smallest video, playing

Sizes

FileCodecSizeSaving

Markup

video element

autoplay only works with muted; playsinline stops iPhones going full screen.

01

What it does

Decodes your GIF frame by frame, re-encodes it as MP4 and WebM with your browser's video encoder, and shows how many bytes the video saves.

  • Its own GIF decoder: every frame, its timing, transparency and disposal
  • H.264 or AV1 in MP4, VP9 or VP8 in WebM, depending on what this browser can encode
  • Three quality levels
  • Plays the result straight away so you can compare

02

Private by design

Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

03

What you get

MP4 and WebM files, the bytes saved and video markup that autoplays like a GIF, with a Copy and a Download button on every result.

  • GIF
  • MP4
  • WebM
  • Video

Why it matters

Animated GIFs are huge. The format dates from 1987, stores at most 256 colours per frame and compresses each frame on its own, so a few seconds of animation can run to megabytes. A video codec does the same job in a fraction of the size, because it only stores what changes between frames. A video with autoplay, loop, muted and playsinline behaves just like a GIF on the page.

This converter does the whole job in your browser. Its own decoder reads every GIF frame with its delay and builds the full picture for each one, handling transparency and the disposal rules GIFs use. WebCodecs, the browser's built-in video encoder, then encodes the frames as H.264 or AV1 in an MP4 and as VP9 or VP8 in a WebM, depending on what your browser supports. You can play the result, compare sizes and download either file with markup ready to paste.

How to use it

  1. Drop a GIF, or use the sample.
  2. Choose MP4, WebM or both, and a quality.
  3. Play the result and compare the sizes.
  4. Download the files and copy the video markup.

FAQ

Which browsers can convert?

Any with WebCodecs video encoding: Chrome and Edge, Safari 26, and Firefox from version 130. The page says if yours can't.

MP4 or WebM?

Offer both if you can: put WebM first and MP4 second in the video element. MP4 with H.264 plays everywhere; WebM with VP9 is often smaller.

Will the video loop like a GIF?

Yes, with the loop attribute. autoplay also needs muted, and playsinline stops iPhones opening it full screen. The markup includes all of these.

Is my GIF uploaded?

No. It's decoded and encoded on your device.

Credits and licences

Uses mp4-muxer and webm-muxer (MIT, Vanilagy). Sample photo: Malham limestone pavement by Paul Morris, CC0, via Wikimedia Commons.

Work with me

Want a site that gets these right?

I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

All developer tools · Back to leej.uk