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
- Drop a GIF, or use the sample.
- Choose MP4, WebM or both, and a quality.
- Play the result and compare the sizes.
- 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.