Convert an animated GIF to MP4

Shrink heavy animated GIFs into MP4s that look better and load faster, all on your device.

Convert animated GIFs to MP4 and cut the file size, often by 80 to 95 percent, with full colour. It is free, needs no account and adds no watermark, and your files are not uploaded: everything runs in your browser on your device. The size limit is your device’s memory, and phones hold less; give the page a short while after one visit to save itself for offline use, and then it works offline.

Drop animated GIFs to convert to MP4or click to choose files. Batches welcome.
    Details

    A video plays once, where a GIF loops. Short loops are repeated so Instagram, WhatsApp and other apps accept them.

    Working…

    Done

    Your files are processed on this device and never sent to a server. Reload the page to clear everything from memory.

    Animated GIFs are one of the heaviest things on a web page. The format dates from 1987: every frame is compressed on its own and limited to 256 colours, so a few seconds of screen recording easily weighs 5 to 20 MB. The same animation as MP4 video is usually a tenth of the size or less, with smooth gradients instead of dithered bands. Page speed tools such as Lighthouse recommend exactly this swap.

    This page plays the animation through once by default, the right choice for a website, where a <video autoplay loop muted playsinline> element loops it for you. Every frame keeps its own delay, and transparent areas become white or black, since video has no transparency.

    Drop a whole folder of GIFs and they are converted one after another in your browser, then downloaded together as a zip. Nothing is uploaded, so unreleased product demos and client work stay on your machine.

    How it works

    1. Drop one or more animated GIFs, or tap to pick them.
    2. Keep Play once for a website, or choose a length for sharing. Pick white or black for transparent areas.
    3. Convert, and compare the sizes in the results.

    In your browser, not on a server

    Stayput reads the GIF byte by byte in your tab with gifuct-js (MIT), decompresses each frame and composites it the way browsers play GIFs, honouring each frame’s delay and disposal rule. Every finished frame goes to your browser’s own video encoder through WebCodecs: H.264 where the browser has one (Chrome, Edge, Safari), VP9 or AV1 where it does not. The encoded frames are written into an MP4 container by mp4-muxer (MIT), all in memory.

    Compared with upload-based tools: GIF to MP4 sites upload the file to convert it on a server, cap the size, and some add a watermark or keep the file for hours. Here the conversion runs on your device, so a reaction GIF, a screen recording of your product or a clip of your kids never leaves it, and the page keeps working offline after one visit and a short wait.

    Verify it yourself. Give the page a short while after one visit to save itself for offline use, then turn off Wi-Fi or switch to airplane mode and run the tool again. Or open your browser's developer tools (F12, or Cmd-Option-I on a Mac), pick the Network tab, and watch it while you convert. The panel above does the same count for you.

    Questions

    How do I put the MP4 on a web page so it acts like a GIF?

    Use a video element with autoplay, loop, muted and playsinline, for example: <video src="demo.mp4" autoplay loop muted playsinline></video>. Browsers only autoplay muted video, and playsinline stops iPhones going full screen.

    Why is my GIF not much smaller as MP4?

    Very small or very short GIFs have little to save, and noisy footage compresses less. Screen recordings, animations with flat colours and anything over a second or two usually shrink the most.

    Is the file uploaded anywhere?

    No. There is no server in this process. The page is a static file and the work is done by code running inside your browser tab. Give the page a short while after one visit to save itself for offline use; then you can turn off Wi-Fi and it still works.

    More video and audio tools

    Other conversions

    Guides