GIF to MP4

Convert GIF, MP4, MOV and WebP and fit any size limit

No upload Free GIFMP4WebMWebP

Why convert a GIF to MP4 at all?

The GIF format shows a short animation almost anywhere, but at a high price. GIFs are stored frame by frame, each frame a picture with at most 256 colors, and the compression between frames is basic. A ten-second reaction clip can weigh several megabytes as a GIF.

An MP4 with the H.264 codec stores the same motion as video. The encoder only keeps what changes from one frame to the next and has millions of colors to work with. For most animations that means smaller MP4 files that look as good or better, with wide compatibility across phones, browsers and apps.

Typical reasons to convert GIF to MP4:

  • A page on your website loads slowly because of large animated GIFs.
  • A chat app or social platform only accepts video, or shows your GIF without motion.
  • You want to post the animation as a video on social media.
  • The file is over an upload limit and you need to reduce file size without cutting it.

How much smaller does the MP4 get?

MP4 files are usually smaller, but by how much depends on the content. Flat cartoons with few colors shrink less, camera footage and screen recording videos shrink a lot. Google’s web.dev team shows an example in its guide to replacing animated GIFs with video: a 3.7 MB GIF became a 551 KB MP4.

You don’t have to guess. After the conversion the tool shows the size before and after, plus the difference in percent. If the MP4 comes out larger (this happens with tiny GIFs of a few kilobytes), you see that too, and you can keep the GIF for the original use.

How do you convert GIF to MP4 with the free online tool?

Here is how to convert GIF to MP4 in six steps. Using our online GIF to MP4 converter is simple: it opens with MP4 already selected as the output format. The whole conversion runs in your browser, so the GIF never leaves your device. There is no upload, no account and no watermark.

  1. Drop your GIF file on the box (drag and drop) or click “Choose a file”. The tool reads every frame and shows the size, the number of frames and the length.
  2. Pick where the video needs to work under “Make it fit for”. The WhatsApp preset sets MP4 at 640 px and aims for 15 MB. The Website preset allows up to 1280 px.
  3. Trim the start and end if you only need part of the animation, and change the speed if you like (0.5× to 3×).
  4. Keep “Original timing” to copy the GIF’s own frame delays, or set a fixed frame rate between 5 and 30 fps.
  5. Choose the width. A square crop is one click away for profile clips and stories.
  6. Click the Convert button to start the conversion. When it is done you get the download, the size comparison and, where your browser can share files, a Share button that sends the MP4 straight to an app.

With original timing the tool automatically picks the frame rate between 10 and 30 fps that matches the GIF’s delays most closely, so the motion keeps its rhythm. Very large animations are scaled to 1280 px on the long side while they are read, to keep memory use in check.

Laptop and smartphone playing the same looping animation side by side, light violet and cyan design
One animation, two screens: as MP4 the same clip plays on a web page and in a chat app.

Need a hard size limit?

Switch on “Fit a target file size” and enter the maximum in KB. For MP4 the tool lowers the bitrate first and then the width, step by step, until the file fits. Each attempt is listed with its size.

Does the MP4 still loop like a GIF?

Repetition works differently. A GIF stores its repeat count inside the file. An MP4 has no such setting, so the player decides whether to repeat it.

On a website you control that with HTML. The tool gives you a ready snippet with the right attributes:

<video src="animation.mp4" width="480" height="270" autoplay loop muted playsinline></video>

The four attributes make the video start by itself, repeat endlessly, play without sound and stay inside the page on iPhones. Browsers block autoplay with sound, so muted is what lets the clip start. In WhatsApp, a clip shorter than six seconds can be sent as a looping GIF from within the app.

What happens to transparency, colors and sound?

Transparency, colors and sound all change when converting a GIF to video. The table lists them with the other differences.

Property Animated GIF MP4 (H.264) from this tool
Colors Up to 256 per frame Full color, no palette banding
Transparency One fully transparent color Not supported: transparent areas become white
Sound None None (the video has no audio track)
Loop Stored in the file Set by the player or the loop attribute
File size Usually large Usually much smaller
Email clients Shows in almost all (classic Outlook for Windows: first frame only) Rarely plays inside the message

If your GIF has a transparent background (a sticker or a logo), the MP4 will show it on white. For a colored page background, keep the GIF or use an animated WebP. To add music or a voice-over, open the MP4 in a video editor afterwards.

Infographic comparing GIF and MP4: colors, transparency, sound, loop, file size and email support
GIF or MP4? The main differences at a glance.

Which browsers support the video conversion?

The tool encodes H.264 with WebCodecs, a video API built into modern browsers. Current Chrome and Edge support it, and so does Safari from version 16.4. Firefox depends on the version and on whether an H.264 encoder is available on the system.

If your browser has no H.264 encoder, the tool creates a WebM video instead and tells you so. WebM is small and plays in web browsers, but iPhone apps and many other programs do not accept it. For MP4 output in that case, open the page in Chrome, Edge or a recent Safari.

When is a GIF image the better tool?

MP4 wins on websites, in chat apps and on social media. GIF is still the most compatible choice in a few places:

  • Email newsletters and signatures: most email programs show GIFs but do not play video inside the message.
  • Old forums, wikis and ticket systems that only accept images.
  • Anything that needs a transparent background.

For those cases, the Amara GIF Maker builds a new GIF from photos or a clip, and the guide on how to add an animation to a website compares GIF, video and CSS for web pages.

How do you convert GIF to MP4 with FFmpeg?

For dozens of files, or as part of a build script, the command-line software FFmpeg is a common choice for a GIF to MP4 conversion. This command creates an MP4 that plays in browsers, on phones and in most apps:

ffmpeg -i input.gif -c:v libx264 -crf 23 -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -movflags +faststart output.mp4

What each part does:

  • -c:v libx264 encodes with H.264.
  • -crf 23 sets constant quality. Lower values give better quality and larger files.
  • -pix_fmt yuv420p uses the pixel format that almost every player understands. Without it, FFmpeg may keep a format that some phones and browsers cannot play.
  • The scale filter rounds width and height down to even numbers, which yuv420p needs. Odd sizes are common in GIFs and make the encoder stop with an error.
  • -movflags +faststart moves the file’s metadata to the start, so a browser starts playing before the download is complete.

Converting a whole folder on macOS or Linux takes one line:

for f in *.gif; do ffmpeg -i "$f" -c:v libx264 -crf 23 -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -movflags +faststart "${f%.gif}.mp4"; done

Frequently asked questions

Does converting GIF to MP4 lose quality? Usually not in a visible way. The MP4 is not limited to 256 colors, so gradients often look smoother than in the GIF.

Does the tool upload your GIF to a server? No. Your files are processed on your own device: reading the GIF and encoding the MP4 both happen in the browser.

Looking for ready-made animations? The free animations library has seasonal clips as MP4 and GIF.