GIF to MP4 Converter
Turn an animated GIF into an H.264 MP4 on your own machine. The result is usually several times smaller, plays inline in every chat client and browser, and carries no watermark. It is the inverse of our video to GIF converter and runs on the same on-device pipeline.
Drop an animated GIF here
Encoding runs in this tab through FFmpeg compiled to WebAssembly. Nothing is uploaded, and this tool only accepts a local file — it cannot download from a URL.
When converting beats compressing
A lot of people arrive at a GIF compressor when what they actually need is a different format. It is worth knowing where the line is.
GIF, designed in 1987, stores an indexed palette of at most 256 colors per frame and compresses each frame with LZW. There is no motion estimation and no interframe prediction. That means a GIF’s size is essentially frames multiplied by pixels, with a hard floor no compressor gets under. Once you are below about 12 frames per second, under 400 pixels wide, and down to 64 colors and it is still too big, you have run out of settings — the format is the constraint.
H.264 was designed for exactly this problem. It stores what changed rather than what is there, in a full color space. Converting is not a compromise in that situation; it is the correct answer, and it usually looks better than the GIF did.
Keep the GIF for email newsletters, where clients will not play video, and for upload fields that accept images only. Everywhere else, MP4 wins on both size and quality.
What the settings do
Quality (CRF)
H.264’s Constant Rate Factor targets a perceptual quality level rather than a bitrate, so simple scenes automatically use fewer bits. Lower numbers mean higher quality and larger files. The three presets here are CRF 19, 23, and 28; 23 is the usual default and is visually indistinguishable from the source for most GIFs.
Output width
Leave it blank to keep the source dimensions. Set a width if the GIF is stored larger than it will be displayed. Height follows automatically, and both are rounded to even numbers because H.264’s yuv420p pixel format requires it.
Why the first run is slower
The FFmpeg core is a WebAssembly binary of roughly 32 MB that has to be fetched into the page before anything can be encoded. That happens once per browser session. Every conversion after it starts immediately.
Frequently asked questions
Why is the MP4 so much smaller than the GIF?
Because H.264 does two things GIF cannot. It predicts each frame from the frames around it, so a static background costs almost nothing after the first frame, whereas GIF re-encodes large parts of every frame. And it uses a full color space instead of a 256-entry palette per frame. For the same clip at the same apparent quality, an MP4 is routinely several times smaller than the GIF it came from.
Will an MP4 play where my GIF played?
Almost everywhere. Discord, Slack, X, Reddit, and every modern browser autoplay short muted MP4s inline and loop them, which is the behaviour people actually want from a GIF. The main exception is email: mail clients will not play video, so a GIF is still the right format for a newsletter. Some older forum software and image-only upload fields are also GIF-only.
Does converting lose quality?
It is a lossy re-encode, so technically yes, but in the useful direction. The source GIF has already been reduced to at most 256 colors, and H.264 has far more color range than that, so at the default quality setting the MP4 typically looks the same as or better than the GIF. Turn the quality up if the GIF contains fine text or sharp graphics.
Can I convert a GIF from a URL?
No, and that is deliberate. This tool takes a file from your device and nothing else. It does not fetch remote URLs and it is not a downloader for any video site. Everything it does happens locally in this browser tab.
Is my file uploaded?
No. FFmpeg is compiled to WebAssembly and runs inside the page. The first conversion downloads the FFmpeg core into your browser, which is roughly 32 MB, and after that everything is local. Your GIF is never transmitted to us or anyone else.
Related GIF tools
- GIF compressor — when you have to stay in GIF
- Discord GIF compressor — fit Discord’s current upload limit
- GIF resizer — change dimensions, keep the animation
- Video to GIF converter — the other direction
Related Tools
More free tools that might be useful
GIF Compressor
Compress and optimize GIF files
Video to GIF Converter
Convert videos to animated GIFs with customization
GIF Maker
Make an animated GIF from images or a video clip