How to convert a GIF to MP4

The same animation can be a 12 MB GIF or a 1 MB MP4, and the MP4 usually looks better. Converting is easy; the only trick is the looping.

Convert in three steps

  1. Open GIF to MP4 and add your GIF.
  2. Leave Plays on once, or choose a repeat count (see the looping section below). Choose a smaller width if the GIF is large.
  3. Press Convert to MP4 and download the video.

Why GIFs are so heavy

GIF dates from 1987. Each frame is stored as an image with at most 256 colours and only simple compression between frames, so a few seconds of animation can reach tens of megabytes. Video formats such as MP4 with H.264 were designed for moving pictures: they store a frame once and then only what changes between frames. For the same content that typically cuts the size by 80 to 95 percent. Colours also improve, because the video is not limited to a 256-colour palette.

Making an MP4 loop like a GIF

A GIF repeats forever; an MP4 plays once unless something tells the player to repeat it. There are two ways to handle that:

  • On a web page, use a video element with the right attributes: autoplay muted loop playsinline. Browsers only autoplay silent videos, which is why the MP4 made here has no sound track. With loop in place, keep Plays at once so the file stays small.
  • In a chat or an editor that has no loop setting, choose 3, 5 or 10 plays so the repeats are written into the file. The file grows with the number of plays, so use the smallest count that suits.

Where a GIF is still the only option

Some email programs, older forums and a few messaging apps accept GIF images but not video, and a video pasted into such a place shows as a file or a still frame. If the destination plays video, use MP4. If it does not, keep the GIF and reduce its size with a shorter length, lower width and fewer frames per second using Video to GIF.

If the MP4 is still too big

Most converted GIFs are well under a megabyte or two. For a long or large GIF, set the width to 720 or 480 pixels in the converter, or run the result through the compressor with the Strong setting.

Keeping the loop seamless

A GIF usually loops without a visible jump because the last frame flows into the first. When you convert, keep that relationship intact:

  • Do not trim the end. A converted GIF loses its last frame if the duration is rounded down, and the loop stutters.
  • Use an even frame rate. GIFs have irregular frame delays; the converter turns them into a constant rate. 25 or 30 fps keeps short, snappy animations close to the original.
  • Check the first and last frame. If the GIF fades out, the MP4 will show a black flash each time it repeats. Choose a GIF that ends where it starts, or accept a short cross-fade.

Size settings that matter

For a GIF, width matters far more than height, because the height follows automatically. A 600-pixel-wide GIF converted at 600 pixels keeps the detail; at 480 it is visibly softer on a laptop screen and perfectly fine in a chat. The frame rate matters for smoothness: 10–15 fps looks like a choppy GIF, 25–30 fps looks like video. Converting at the GIF’s original rate is the safe default; raising it cannot add smoothness that the GIF never had.

Transparency and emoji

GIF supports one fully transparent colour, and MP4 does not support transparency at all. A GIF with a transparent background becomes a video with a solid background, usually black. If the transparency is essential, keep the GIF or use WebM with VP9, which can carry an alpha channel. The same limit applies to “emoji” GIFs designed to sit on a coloured chat background: converted to MP4, they bring their own background with them.

Alternatives worth knowing

Animated WebP is a middle ground: much smaller than GIF, supports transparency, and plays in every current browser. APNG is another option with the same advantages and the same browser support. Both are still images to a messaging app, which is sometimes exactly what you want. For a website, though, a muted MP4 in a <video> element is smaller than all of them and gives you real playback controls if you want them.