FormatDrop
How-To Guide

How to Convert GIF to MP4

GIF files are notoriously large — a 5-second animation can be 5-20MB as GIF but 100-500KB as MP4. Converting GIF to MP4 (H.264) achieves 90-98% size reduction with better quality. This is why Twitter, Imgur, and most platforms automatically convert GIF uploads to MP4 behind the scenes.

Step-by-step instructions

  1. 1

    Method 1: Browser converter

    Go to formatdrop.com → Video Converter. Drop your GIF file. Select MP4 as output. Download the converted file. The browser re-encodes the GIF as H.264 MP4.

    Go to converter
  2. 2

    Method 2: FFmpeg (best control over quality)

    ffmpeg -i input.gif -c:v libx264 -pix_fmt yuv420p -vf 'scale=trunc(iw/2)*2:trunc(ih/2)*2' -movflags faststart output.mp4. The '-pix_fmt yuv420p' ensures compatibility with all players. The 'scale' filter rounds dimensions to even numbers (required for H.264). '-movflags faststart' moves the MP4 index to the front for streaming.

  3. 3

    Preserve looping (for social media)

    MP4 doesn't loop by default. Platforms like Twitter and Slack auto-loop short MP4 videos. If you need a file that loops everywhere: add the loop flag in HTML: <video loop autoplay muted>. For a self-looping MP4: ffmpeg -i input.gif -stream_loop -1 -c:v libx264 -t 30 output.mp4 (creates a 30-second MP4 that loops the GIF content).

  4. 4

    Optimize for web (silent, autoplay-compatible)

    For web embedding that autoplays in browsers: the MP4 must be muted. FFmpeg output for autoplay: ffmpeg -i input.gif -c:v libx264 -pix_fmt yuv420p -an output.mp4. The '-an' flag removes audio (GIFs have no audio anyway). Autoplay in browsers requires muted video.

Why convert GIF to MP4?

GIF (Graphics Interchange Format) dates from 1987 and uses a colour palette-based LZW compression algorithm designed for the web of that era. It's wildly inefficient for animation: a 640×480 GIF at 24fps uses a separate compressed frame for each image, with no inter-frame prediction or motion compensation. H.264 video encodes the differences between frames, achieving 10-50x better compression for animated content. The file size difference between GIF and MP4 for the same animation is often 95%+ — making GIF-to-MP4 conversion one of the highest-impact optimizations for web performance.

Your files never leave your device

FormatDrop runs the conversion engine entirely inside your browser using WebAssembly. No file upload. No server. Nothing stored. You can verify this by opening DevTools → Network tab and watching: zero upload requests.

Frequently asked questions

Why does Twitter convert GIFs to MP4?
Twitter (now X) converts all GIF uploads to MP4 because GIF files are too large for efficient distribution. A 10MB GIF becomes a 200-500KB MP4 — Twitter's CDN serves the MP4 to all users. The animation behaviour is identical from the user's perspective, but bandwidth usage drops by 95%+. This is standard practice: Imgur, Reddit, Discord, Slack, and most modern platforms convert GIF uploads to MP4 or WebP.
Does GIF to MP4 lose quality?
GIF is limited to 256 colours per frame. MP4 H.264 supports full 24-bit colour (16.7 million colours). Converting GIF to MP4 actually improves colour quality while dramatically reducing file size. At crf=18 or lower, the MP4 looks identical to or better than the GIF. The only potential issue: GIF supports binary transparency (on/off per pixel); H.264 doesn't support transparency. For animated content with transparency, consider animated WebP instead.
Convert GIF to MP4 Now — Free

No account. No upload. Works in any browser.