GIF vs MP4 — Which Format Is Better for Animations?

language Cet article est disponible en anglais uniquement.

GIF was invented in 1987. Ronald Reagan was in his second term. The internet didn't exist for regular people yet. And somehow, nearly four decades later, you're still using this format to share a clip of someone shrugging at a meeting.

That's not a complaint. It's genuinely impressive how stubborn GIF has been. But the fact that it's everywhere doesn't mean it makes sense, and if you care at all about page speed or image quality, it's worth understanding what's actually happening when you reach for a GIF instead of an MP4.

Why GIF looks so bad

The format was designed for simple web graphics: logos, icons, flat illustrations. Nobody in 1987 was planning for looping video clips of cats falling off shelves.

GIF's color limit is 256 per frame. Not 256 shades of one color, 256 colors total. A photograph has millions. When you convert any real footage to GIF, the encoder has to pick 256 colors and approximate everything else through dithering, which is why GIFs of real-world footage look grainy and vaguely wrong. You've seen this: the slightly muddy skin tones, the banded sky gradients, the general sense that the image was rendered on a potato.

MP4 supports 16.7 million colors with no approximation needed. Same clip, completely different result.

The file size problem is worse than you think

Here's where it stops being a visual inconvenience and becomes an actual performance problem.

GIF stores every frame almost independently. A five-second clip at 15 frames per second is 75 frames of image data stacked on top of each other. MP4, by contrast, only stores what changes between frames. If the background stays the same for two seconds, MP4 encodes that background once. GIF encodes it thirty times.

The result: a 10 MB GIF is routinely equivalent to a 200 KB MP4. That's not a rounding error or a best-case scenario. That's a typical conversion.

Format 5-sec clip, 480p 5-sec clip, 720p
GIF 8–15 MB 25–50 MB
MP4 (H.264) 150–400 KB 400 KB–1 MB

On desktop with a fast connection this might not feel like much. On mobile, on a weaker connection, those extra megabytes translate directly into a loading spinner where your animation should be.

So why does GIF still exist

Because email clients are frozen in 2008, mostly.

Outlook, Apple Mail, and most corporate email clients don't support the <video> tag. If you want an animated image inside an email, GIF is your only option that actually works. That's a real constraint, not a theoretical one, and it affects a lot of people.

Beyond email, GIF holds up in a narrow set of contexts: platforms that don't support video embeds (some older CMS editors), very short animations with flat colors where the 256-color limit isn't relevant, and situations where you need autoplay behavior without any JavaScript.

For everything else, the argument for GIF mostly comes down to habit.

What modern platforms actually do with your GIFs

Here's a detail that changes the calculation a bit: Twitter, Reddit, and Discord all convert your GIF to MP4 the moment you upload it. Tenor and Giphy do the same. You upload a 12 MB GIF, they silently transcode it to a 300 KB video and serve that instead.

Which means when you upload a GIF to any of those platforms, you're paying the file size cost twice: once to download the original, once for the platform to process it, and the end result is MP4 anyway. You're better off converting it yourself first and uploading the MP4 directly.

Replacing GIF on your own website

If you run a website and you're still serving GIFs, the fix is straightforward. Replace any GIF embed with this:

<video autoplay loop muted playsinline>
  <source src="animation.mp4" type="video/mp4">
</video>

autoplay and loop give you the same behavior as a GIF. muted is required for autoplay to work in Chrome. playsinline keeps iOS from hijacking the video into fullscreen. The visual result is identical, the file is potentially 95% smaller, and the quality is noticeably better.

The only reason not to do this is if you're working in an environment where you can't control the HTML, which brings us back to the email scenario.

When to actually use GIF

Be specific: email is the main one. If you need animated content in an email and you want it to work in Outlook, GIF is your answer. There's no good alternative.

Short animations with very simple graphics are also fine as GIFs, especially if the source material only uses a handful of colors. A two-second loading spinner, a blinking cursor, a basic icon animation: these will survive the 256-color limit without looking terrible.

Everything else, use MP4.

The honest summary

GIF is a 1987 format that's survived entirely because the web is hard to change and email clients are even harder. It's genuinely useful in specific situations. It's a poor choice for general use. The file size difference is severe enough that it affects real users on real connections, and the quality difference is visible to anyone paying attention.

The format isn't going anywhere. It's too embedded in how people share things online. But knowing when you're using it out of habit versus necessity is the kind of thing that quietly improves a website without requiring a redesign.

auto_awesome

Try it free — no signup

GIF to MP4

Convert animated GIFs to MP4 video online. Turn large GIFs into efficient video clips for social media sharing.

arrow_back All articles