Why a GIF weighs so much more than the same clip as video
GIF89a dates from 1989, and its animation support was bolted onto an image format rather than designed as video. Every frame is an indexed bitmap with a palette of at most 256 colors, LZW-compressed on its own. There is no motion compensation, no bidirectional prediction, no chroma subsampling, none of the machinery a modern video codec relies on. GIF’s single concession to redundancy is that a frame may declare a smaller dirty rectangle and reuse the previous frame’s pixels around it, which helps a static background and does nothing whatsoever for a pan, a fade or a camera move.
It is worth putting rough numbers on that. A 480 by 270 frame is 129,600 pixels, and at one palette byte each that is 129,600 bytes before LZW touches them. Five seconds at 20 frames per second is 100 frames, so on the order of 12 MB of raw index data going into the compressor. LZW claws back a useful chunk of that on flat, cartoon-like art and very little on dithered photographic content, which is why screen captures and video-sourced GIFs are the monsters. H.264 encoding the same 100 frames describes most of them as motion vectors plus small residuals against their neighbours, and the file that comes out is typically smaller by a factor of ten or more.
The saving is not a setting you found. It is what happens when a 1989 image format is replaced with a codec built for moving pictures.
What the conversion gives up
Two things, and both come up often enough to state plainly rather than bury.
GIF supports one fully transparent palette entry. H.264 in an MP4 has no alpha channel, and this converter forces yuv420p output because that is what every hardware and software decoder expects. A GIF with a transparent background therefore becomes an opaque rectangle. If the transparency is doing real work, such as a logo animation sitting over a colored page, an MP4 is simply the wrong destination.
An MP4 also is not an image. Plenty of places accept an <img> tag and not a <video>: older forums, many email clients, several wiki syntaxes, some upload forms that sniff the MIME type. That is the one honest reason GIF is still alive in 2026, and it is the reason to keep the original around after converting.
Making the MP4 behave exactly like a GIF on a page
A converted GIF is not a drop-in replacement for the <img> tag it came from, but it is close:
<video src="clip.mp4" loop autoplay muted playsinline></video>
Each attribute earns its place. loop restores the endless repeat. muted is not optional: every browser blocks autoplay for a video with an audio track unless it is muted, and since this converter passes -an there is no audio track at all, so muted is both accurate and required. playsinline stops iOS Safari from hijacking the clip into a fullscreen player. Add preload="none" and a poster image if the animation sits below the fold, since the whole point of the exercise was page weight.
The -an flag is worth a note from building this. A GIF has no audio, so stripping audio looks redundant. Being explicit means the muxer never invents an empty audio stream, which some older players and some upload validators stumble over. It costs nothing and removes a class of mystery failures.
The three clicks, and the single number behind them
- Drop your
.gifinto the box above, or click to choose it. - Pick a quality level. The three options are one number in disguise, x264’s constant rate factor: 18 for High quality, 23 for Balanced, 28 for Smaller file. Lower spends more bits.
- Click Convert GIF to MP4 and download the result, which keeps your file name with a new extension.
Balanced is the honest default here, more so than for a camera-shot video. A GIF’s source frames were already quantised to 256 colors, so the detail an aggressive CRF would throw away has mostly been thrown away once already. Reach for High quality when the GIF contains text or fine line art, and for Smaller file when you are optimising page weight hard and can accept slightly softer edges. Dimensions may shift by a single pixel in either direction, because H.264 needs even width and height and GIFs are frequently odd-sized.
Where this tool stops and which sibling picks up
The conversion happens locally, through FFmpeg compiled to WebAssembly and running in the tab, so a GIF made from a private screen capture never leaves the machine it was captured on. That also means the encode uses one CPU core and a very long animation takes real time.
If you need to stay in GIF format because the destination only accepts images, Compress GIF is the right move rather than converting away from it. Going the other direction, cutting a looping animation out of a video clip, is MP4 to GIF. And if your GIF is really a slideshow of stills, Images to GIF gives you far better control over palette and timing than converting a finished GIF ever will.