All posts
Comparisons 6 min readOctober 31, 2026

GIF vs MP4 vs WebP: Best Format for Short Animations

By , Founder of Filoshi

GIFs are huge and limited to 256 colors. When MP4, WebM or animated WebP is the better loop, where GIF still wins, and how to keep a GIF small.

Get Filoshi · $29The file converter that works on your PC. 1,841 tested conversions, nothing uploaded.

GIF dates from the late 1980s. It is limited to 256 colors per frame and compresses motion poorly, so a GIF is often many times larger than the same clip as video. A muted, looping MP4 or WebM is usually the better choice for websites. GIF still wins where only images are accepted, such as email and some chat and forum posts.

Why GIFs are so large

The format is described in the GIF89a specification, and the design choices explain the size.

  • A palette of at most 256 colors. Each frame is stored as indexes into a color table. Photos and gradients have to be squeezed into 256 colors, which causes banding, and the dithering that hides it makes the data harder to compress.
  • LZW compression. It is a general-purpose method from the 1980s, applied to each frame's pixel indexes. It does well on flat areas and badly on noise, grain and gradients.
  • No motion prediction. A video codec stores one frame and then mostly the differences, predicting where blocks of the picture moved. GIF has no such tools. It stores every frame as an image, with only limited tricks like leaving unchanged areas transparent.

A short, smooth clip with real-world footage is the worst case. A flat cartoon with few colors is the best case.

Video as a GIF replacement

web.dev has a whole article on replacing GIFs with video. It notes that animated GIFs "can be downright huge," and gives a worked example where a 3.7 MB GIF becomes a 551 KB MP4 and a 341 KB WebM. That is one example from the article, not a rule, and your clip will differ. The direction is reliable, though.

To make a video behave like a GIF on a web page, it recommends this markup:

<video autoplay loop muted playsinline>

with <source> elements for WebM and MP4 inside it. Each attribute copies a GIF trait: it starts by itself, repeats, has no sound, and plays in place instead of going full screen on phones. Browsers do not choose the smallest source on their own, so order the sources the way you want them tried. List WebM first if you want it used when available. WebM itself is explained in What is WebM?

Animated WebP and AVIF

Animated WebP is a middle path: it stays an image, so it works in an img tag and in places that expect pictures, while using better compression than GIF, with full color and partial transparency. caniuse shows WebP supported by all current major browsers, and that includes animation support in them. Check the page for the date and details.

AVIF can also be animated, and MDN covers both in its image types guide. Support for animated AVIF in apps, chat tools and editors is less certain than for WebP, so test where you plan to post. If you want a quick refresher on the format family, see What is AVIF?

The catch with animated WebP outside browsers is the same as with static WebP: older editors, email clients and some chat apps may not play it. If you have trouble, GIF to WebP and back are both easy to do (see GIF to WebP).

Where GIF is still the right call

  • Email. Most email clients show a GIF animating inline. Video usually does not play in an email body, and animated WebP support is patchy.
  • Places that accept images only. Some forums, comment boxes, wikis, documentation tools and older chat systems take a GIF but not a video.
  • Anywhere you cannot control the page. If you are pasting into someone else's system, GIF is the format most likely to just work.

Some apps convert uploaded GIFs into video behind the scenes, and some accept MP4 directly where they used to want a GIF. Limits and behavior change, so check the app's own help page for the current rules. I won't quote them here.

Making a GIF that isn't enormous

If you must have a GIF, these changes help the most, in order:

  1. Trim first. Every extra second adds frames. Cut to the exact moment. For more on frame timing, see video frame rates explained.
  2. Shrink the dimensions. Halving width and height cuts the pixels to a quarter.
  3. Lower the frame rate. 10 to 15 frames per second is often enough for screen recordings and reactions. Smooth motion needs more.
  4. Prefer flat art. Clips with large flat areas compress far better than noisy footage.

In the Filoshi Windows app, the file viewer's Trim, Resolution and Frame rate settings apply when you convert a video. If you do not set them, a video converted to GIF uses 15 frames per second and a width of 480 pixels. You will find MP4 to GIF and MOV to GIF in the tested list, along with GIF to MP4 and GIF to WebP. The app does not expose palette or dither settings, so you cannot tune those. I also have not measured size ratios against other tools, so I won't quote any.

The free try on the home page turns a GIF into MP4 or WebM in your browser. Turning a GIF into PNG or JPG gives only the first frame.

I make Filoshi, so weigh my take on it accordingly.

Comparison table

GIFMP4 (H.264)WebMAnimated WebP
Colors256 per frameFull colorFull colorFull color
SoundNoYesYesNo
Typical sizeLargestSmallSmallSmaller than GIF
Works as an image tagYesNo (video tag)No (video tag)Yes
EmailWidely shownRarely playsRarely playsPatchy

For the broader choice of image formats on a website, read the best image format for websites.

Frequently asked questions

Why is my GIF bigger than the video it came from?

GIF stores every frame as a palette image with simple compression and no motion prediction, while a video codec stores mostly the changes between frames. The same clip therefore takes far more space as a GIF. web.dev's example turns a 3.7 MB GIF into a 551 KB MP4.

Does Discord or Slack accept MP4 instead of GIF?

Many chat apps accept video files and play them inline, but the rules on size, looping and autoplay differ and change over time. Check the app's own help page before you plan around it. If a short loop must show up everywhere, a GIF is the fallback.

Is animated WebP supported everywhere?

Not everywhere. caniuse shows WebP supported in all current major browsers, but older desktop software, email clients and some chat apps may not display it, or may show only a still frame. Test it where you will post it, and keep a GIF or MP4 as a fallback.

Can a GIF have sound?

No. The GIF format has no audio track. A "GIF with sound" is really a video file. If you need sound with a short loop, use MP4 or WebM and let the viewer unmute it.

gif mp4 webp animation video

Ready to convert files privately?

1,841 tested conversions. No uploads. No accounts. Runs entirely on your machine.

Get Filoshi · $29