By Tim King · Updated
GIF to Video
Smaller WebM or MP4 From an Animated GIF, With Loops and Pixel Art Scaling
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the GIF to Video works
This GIF to video converter turns an animated GIF into a WebM or MP4 file that is usually a fraction of the size. Drop in the GIF, choose how many times the loop should play, press Render and download. The GIF is decoded and re-encoded in your browser, so nothing is uploaded.
Animated GIFs are everywhere, but many places that matter now prefer video. Instagram, TikTok and YouTube Shorts will not take a GIF upload at all. Ad networks and email platforms cap file sizes that a 5 MB GIF blows straight through. And a web page that swaps a heavy GIF for a short looping video often loads several times faster.
How the GIF to video conversion works
The tool reads the GIF file byte by byte, decodes every frame's LZW-compressed pixels and rebuilds the full picture for each moment, honouring the frame disposal rules that say whether the next frame paints over, clears or restores what came before. It then plays that sequence onto a canvas at 30 frames per second, holding each GIF frame for its own delay, and records the canvas with the browser's MediaRecorder.
Delays under 20 ms are treated as 100 ms, because that is what Chrome, Firefox and Safari do when they play the GIF. The video therefore runs at the speed people are used to seeing, not the speed the file nominally claims.
Why the video is so much smaller
GIF compresses each frame on its own, with a 256-colour palette and no idea of motion. Video codecs such as VP9 and H.264 store a key frame and then only what changes, so a reaction GIF of 4 MB often becomes a 300 to 600 kB video. Flat, cartoon-style GIFs shrink the least, because GIF already handles those well; photographic GIFs with dithering shrink the most.
| GIF | Typical GIF size | Typical video size |
|---|---|---|
| 480 px reaction clip, 3 s | 2–5 MB | 0.2–0.6 MB |
| 320 px UI demo, 6 s | 0.5–1.5 MB | 0.1–0.4 MB |
| 64 px pixel-art sprite, 1 s | 10–50 kB | 30–120 kB at 3× |
Choosing the options
- Play the loop: a video does not repeat by itself on most platforms, so a 1-second GIF makes a very short video. Repeating it 3 to 10 times gives a clip long enough to post.
- Scale with Sharp: for pixel art and small sprites, 2× or 3× with Sharp scaling keeps every pixel a crisp square instead of a blur.
- Transparent areas: video has no transparency, so see-through pixels are filled with black or white. Pick whichever matches the page or feed it will sit on.
Tips and pitfalls
On a website, use the video as a GIF replacement: <video autoplay muted loop playsinline>
behaves exactly like a GIF, and every browser will autoplay it because it is muted.
Platforms want a minimum length. Instagram Reels and Stories reject clips under about 3 seconds, so raise the loop count for short GIFs.
Tiny GIFs can grow. A sprite of a few kilobytes has nothing for a video codec to save, so convert those only when the destination demands video.
How to read the result
The stats show the GIF's frame count, how long one pass of the loop lasts, the video's pixel size and length, and both file sizes so you can see what was saved.
FAQ
Why convert a GIF to a video?
Video files are typically 5 to 10 times smaller, play more smoothly and are accepted by social platforms that refuse GIF uploads. For websites, a looping muted video loads faster and uses less data on mobile than the equivalent GIF.
Is the GIF uploaded anywhere?
No. The GIF is decoded by JavaScript on this page and the video is recorded by your browser's built-in MediaRecorder. The file never leaves your device, and the tool keeps working offline once the page has loaded.
Will the video keep the GIF's transparency?
No. WebM and MP4 as recorded here have no alpha channel, so transparent pixels become the background colour you choose. If you need transparency, animated WebP or the original GIF remain the better formats.
Why does the render take a few seconds?
The browser records the canvas in real time, so a GIF that plays for 2 seconds, repeated 3 times, takes about 6 seconds to render. Keep the tab in front so the browser does not slow it down.
See also: all Audio & Video tools, Units, Images, Documents, Data & Code.
Related tools
Video To GIF
Convert a short section of a video into an animated GIF.
GIF Frame Extractor
Save any frame of an animated GIF as a PNG.
Video Loop Maker
Repeat a short video several times in one file.
Pixel Art Upscaler
Enlarge sprites 2× to 32× without blurring the pixels.
Image To WebP
Convert to WebP, JPEG or PNG with a quality slider.