GIF to MP4 Converter

Drop in an animated GIF and get back an H.264 MP4 with every frame and its original timing — made by your browser’s own video encoder, so the file never leaves your device. On screen-recording GIFs we tested, the MP4 was 2.3 to 11.2 times smaller.

How to convert a GIF to MP4

  1. Drop the GIF on the box above, or click to choose one (up to 50 MB).
  2. Conversion starts immediately and takes a few seconds on a laptop — in our tests, under six seconds even for a 33 MB GIF.
  3. Play the MP4 next to the original to check it. If the GIF had see-through areas, choose whether they become white or black.
  4. Click Download MP4.

Why the MP4 is so much smaller

A GIF is a sequence of palette images, each squeezed with LZW, a lossless method from the 1980s. At best it can skip the pixels that didn’t change since the last frame. H.264 goes much further: it predicts each frame from the ones around it, including movement — a window sliding across the screen is stored as “this block moved 12 pixels left” rather than as new pixels. It also discards detail the eye doesn’t notice and stores colour at lower resolution than brightness, which is invisible on screen content.

The result is counter-intuitive: the MP4 is both far smaller and better looking, because it isn’t limited to 256 colours per frame. Gradients, shadows and photos inside a screen recording come through without the banding a GIF palette causes.

Measured on real screen-recording GIFs

Four GIFs, converted on this page in two browser engines. The first three were made from our own raw screen captures at 15 fps; the fourth is a real-world GIF that had already been through a good encoder.

GIFGIF sizeMP4 (Chrome)MP4 (Safari engine)
Desktop, 5 s, 1280 px4.2 MB0.37 MB · 11.2× smaller1.2 MB · 3.5× smaller
Desktop, 15 s, 1280 px18.9 MB3.4 MB · 5.5× smaller3.1 MB · 6.1× smaller
iPhone, 28 s, 480 px33.2 MB6.0 MB · 5.5× smaller3.0 MB · 11.0× smaller
Real-world GIF, 3.6 s4.7 MB1.1 MB · 4.2× smaller2.0 MB · 2.3× smaller

Each browser ships its own H.264 encoder, and they make different trade-offs: the same 5-second GIF came out 11× smaller in Chrome but 3.5× smaller in Safari’s engine, while the 28-second one went the other way. Either way, every GIF we tried shrank at least twofold.

Using the MP4 where you used the GIF

On a web page, a video tag with four attributes behaves exactly like a GIF — it starts on its own, loops, stays silent and plays inline on iPhone instead of going full screen:

<video src="demo.mp4" autoplay loop muted playsinline></video>

muted matters: browsers only autoplay video that is muted. playsinline stops iOS Safari from opening it full screen. Everywhere else, upload the MP4 as you would a video: GitHub issues, pull requests and comments accept MP4 uploads and play them in place. Chat apps and social sites each handle short silent clips their own way, so check how yours plays them.

Keep the GIF where only images are accepted — a README image embedded with Markdown’s ![]() syntax, email newsletters, and many documentation tools. For those, shrink it with the GIF Compressor instead.

What changes in the conversion

  • Timing — kept frame for frame. Delays under 20 ms become 100 ms, matching how browsers already play such GIFs.
  • Size — unchanged, except that odd widths or heights gain one pixel of background colour, because H.264 needs even dimensions.
  • Transparency — filled with white or black; video has no alpha channel.
  • Looping — not stored in the file. Set it where the video plays.
  • Format — H.264 in an MP4 container, which plays everywhere. Browsers that can’t encode H.264 get a VP9 WebM file instead, and the tool labels it.

Frequently asked questions

Does the converter send my GIF to a server?+

No. Decoding and encoding both happen inside your browser tab, using the video encoder built into the browser. The MP4 is created on your device and downloaded from there; we only log anonymous usage such as file size in KB and conversion time.

How much smaller is the MP4?+

On our four test GIFs — all screen recordings — the MP4 came out 2.3 to 11.2 times smaller. Results vary with the browser, because Chrome and Safari each use their own video encoder — the same GIF can shrink 11× in one and 3.5× in the other.

Will the MP4 loop like the GIF did?+

Looping isn’t stored in an MP4 file — it is decided by whatever plays it. On your own web page, add the loop attribute to the video tag (example above). Chat apps and social sites each have their own rule for short clips, so check the one you are posting to.

Is the frame timing kept exactly?+

Yes. Every GIF frame becomes one video frame with the same display time, so pauses stay the same length and the video lasts as long as the GIF. The one adjustment: frame delays under 20 ms are treated as 100 ms, which is how browsers already play them.

What happens to transparent parts of the GIF?+

MP4 video has no transparency, so transparent pixels are filled with a solid colour. The converter uses white by default and shows a White / Black switch whenever your GIF has transparent areas.

Why is my video one pixel wider or taller than the GIF?+

H.264 video needs even dimensions. If your GIF is, say, 121×81, the converter adds a one-pixel strip of the background colour to make it 122×82 rather than stretching the image, which would soften text.

Which browsers can run it?+

Any browser with WebCodecs video encoding: current Chrome, Edge and Firefox, and Safari 26 or later on Mac, iPhone and iPad. If H.264 encoding isn’t available, the tool makes a VP9 WebM file instead and says so.

Does the MP4 have sound?+

No. GIFs never carry audio, so the MP4 has a video track only. If you embed it to autoplay, still add the muted attribute — browsers only autoplay video that is marked muted.

Learn more

Related free tools

Screenify Studio

Skip the GIF entirely

Screenify Studio records your Mac and exports MP4 or GIF straight from the timeline, so you pick the format before the file exists. Free plan for macOS.

Download Screenify Studio — free for Mac