← All articles 12 min read

Convert MP4 to GIF: 5 Methods Compared (2026)

You have a screen recording, a reaction clip, or a tutorial snippet in MP4 format. You need it as a GIF — maybe for a GitHub README, a Slack message, a forum post, or a product demo where autoplay video is not supported. The problem: most MP4-to-GIF tools either upload your file to a remote server, cap file size at 50 MB, or produce bloated GIFs with washed-out colors.

Pixotter's MP4 to GIF converter solves this. It runs entirely in your browser using WebAssembly — your video never leaves your device. No upload, no server queue, no file size cap, no account required. Drop the MP4, configure your output settings, and download the GIF.


Convert your MP4 to GIF nowOpen Pixotter's free converter. No signup, no upload, no watermark.


GIF remains the universal animated image format. Every browser renders it, every chat app embeds it, every CMS accepts it. When you need an animation that works everywhere without a video player, GIF is still the answer. The trade-off is file size — and that is manageable with the right optimization (more on that below).

This guide covers five ways to convert MP4 to GIF, explains when the conversion makes sense, and shows you how to optimize the output so it does not balloon to 30 MB.

Methods Comparison

Method Type Batch Support Quality Control Platform Cost
Pixotter Browser (WASM) No Frame rate, dimensions, duration Any (browser) Free
FFmpeg 7.0 CLI Yes Full (palette, dither, fps, scale) Windows, macOS, Linux Free
ImageMagick 7.1 CLI Yes Moderate (resize, delay, colors) Windows, macOS, Linux Free
GIMP 2.10.36 Desktop GUI No Frame-level editing Windows, macOS, Linux Free
ezgif.com Browser (server) No Basic (fps, resize) Any (browser) Free (ads, 100 MB limit)

Method 1: Pixotter (Browser, No Upload)

The fastest path from MP4 to GIF. Zero setup.

  1. Open pixotter.com/convert-mp4-to-gif/.
  2. Drop your MP4 file onto the drop zone, or click to select it.
  3. Adjust output settings — frame rate, dimensions, and duration range.
  4. The conversion runs locally on your hardware via WebAssembly.
  5. Download your GIF.

Your video never touches a server. There is no file size limit beyond your browser's memory (which handles most clips under 200 MB comfortably). No watermark, no account, no subscription.

Best for: Quick, one-off conversions where you want privacy and zero friction.


Method 2: FFmpeg 7.0 (CLI, Full Control)

FFmpeg is the gold standard for video manipulation. The MP4-to-GIF conversion requires a two-pass approach for decent color quality — GIF only supports 256 colors, so FFmpeg builds an optimized palette first.

License: FFmpeg is released under the LGPL 2.1 (or GPL 2+ depending on build configuration). Free for personal and commercial use.

Generate the palette

ffmpeg -i input.mp4 -vf "fps=15,scale=480:-1:flags=lanczos,palettegen=stats_mode=diff" palette.png

Convert using the palette

ffmpeg -i input.mp4 -i palette.png -lavfi "fps=15,scale=480:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=floyd_steinberg" output.gif

What each flag does:

Trim before converting

If you only need seconds 3 through 8 of the video:

ffmpeg -ss 3 -t 5 -i input.mp4 -vf "fps=15,scale=480:-1:flags=lanczos,palettegen=stats_mode=diff" palette.png
ffmpeg -ss 3 -t 5 -i input.mp4 -i palette.png -lavfi "fps=15,scale=480:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=floyd_steinberg" output.gif

Batch convert a directory

for f in *.mp4; do
  ffmpeg -i "$f" -vf "fps=15,scale=480:-1:flags=lanczos,palettegen=stats_mode=diff" palette.png
  ffmpeg -i "$f" -i palette.png -lavfi "fps=15,scale=480:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=floyd_steinberg" "${f%.mp4}.gif"
  rm palette.png
done

Best for: Developers, CI pipelines, batch conversions, and anyone who wants maximum control over output quality.


Method 3: ImageMagick 7.1 (CLI, Simpler Syntax)

ImageMagick can convert MP4 to GIF, though it lacks FFmpeg's palette optimization. It works best when you already have ImageMagick installed for other image tasks.

License: Apache 2.0. Free for personal and commercial use.

Note: ImageMagick's MP4 reading depends on having FFmpeg libraries available as a delegate. On most systems with both installed, this works automatically.

magick input.mp4 -resize 480x -layers optimize -delay 7 output.gif

ImageMagick's output tends to be larger than FFmpeg's because it does not perform palette optimization per frame. For short clips under 5 seconds, the difference is negligible. For longer animations, FFmpeg produces noticeably smaller and better-looking results.

Best for: Quick conversions when ImageMagick is already in your toolkit and file size is not critical.


Method 4: GIMP 2.10.36 (Desktop, Frame-Level Editing)

GIMP can open MP4 files (via the GAP plugin or by importing frames) and export as GIF. This approach makes sense only when you need to edit individual frames — add text, remove elements, adjust timing per frame.

License: GPL 2.0. Free for personal and commercial use.

  1. Install the GIMP Animation Package (GAP) if not already present.
  2. Open GIMP and go to Video > Split Video into Frames.
  3. Select your MP4 file. GIMP extracts each frame as a separate layer.
  4. Edit frames as needed — crop, add text, adjust colors.
  5. Go to File > Export As, choose GIF, and check As Animation.
  6. Set the delay between frames (100 ms = 10 fps) and select Loop forever.
  7. Export.

This is the slowest method by a wide margin. A 10-second, 30 fps video creates 300 layers. GIMP handles it, but expect sluggish UI on lower-end machines.

Best for: Editing individual frames before exporting. Not suitable for quick or batch conversions.


Method 5: ezgif.com (Browser, Server-Side)

ezgif is a popular web-based converter. Upload your MP4, configure settings, and download the GIF.

License: Proprietary web service.

  1. Go to ezgif.com and select Video to GIF.
  2. Upload your MP4 (100 MB limit).
  3. Select the portion of the video to convert.
  4. Set frame rate and size.
  5. Click Convert to GIF and download.

The main drawbacks: your video uploads to ezgif's servers, there is a 100 MB file size limit, and the site runs ads. For casual, non-sensitive conversions, it works fine. For anything with proprietary content, client-side tools like Pixotter are the safer choice.

Best for: One-off conversions when you cannot install software and do not mind uploading your file.


MP4 vs GIF: When to Convert

Not every MP4 should become a GIF. The two formats solve fundamentally different problems.

Feature MP4 (H.264) GIF
Codec H.264 / H.265 LZW (frame-based)
Color depth 16.7 million (8-bit per channel) 256 colors per frame
Typical file size (5s clip) 200 KB - 1 MB 2 MB - 20 MB
Transparency No (H.264) Yes (1-bit, on/off)
Audio Yes No
Looping Requires player/attribute Built-in, automatic
Best for Video content, social media, streaming Short animations, reactions, demos, inline docs

When GIF is the right choice

When to keep MP4

For the reverse conversion — when your GIF should be an MP4 — see How to Convert GIF to MP4.


Optimizing the Output

A raw MP4-to-GIF conversion often produces a file 10-20x larger than the source video. GIF is inherently less efficient than modern video codecs. These four optimizations bring the file size down to something reasonable.

1. Reduce the frame rate

A 30 fps MP4 converted frame-for-frame to GIF produces twice the data of a 15 fps version — and the human eye barely notices the difference in short animations. For screen recordings and UI demos, 10-12 fps is often sufficient.

In FFmpeg: fps=15 (or fps=10 for screen recordings). In Pixotter: adjust the frame rate slider before conversion.

2. Optimize the color palette

GIF supports 256 colors per frame. A naive conversion picks a single global palette and applies it to every frame, which causes banding and color shifts. FFmpeg's two-pass palette generation (palettegen + paletteuse) builds an optimized palette that allocates colors where they matter most.

The stats_mode=diff option is particularly effective for animations where most of the frame stays static (screen recordings, UI demos, slides). It allocates palette slots to the pixels that actually change.

3. Reduce dimensions

GIF file size scales roughly linearly with pixel count. Halving the dimensions cuts file size by approximately 75%. Most GIFs shared in chat, docs, or READMEs do not need to be 1920x1080. Common targets:

4. Trim duration

Every second of animation adds frames and file size. If your MP4 is 30 seconds but the interesting part is 4 seconds, trim before converting. Both FFmpeg (-ss and -t flags) and Pixotter support duration trimming.

After conversion, if the GIF is still larger than you need, run it through Pixotter's GIF compressor to squeeze out additional bytes through lossy color reduction and frame optimization.

Quick reference: optimization impact

Optimization Typical size reduction Quality impact
30 fps to 15 fps ~50% Minimal for most content
30 fps to 10 fps ~67% Noticeable in fast motion
1080p to 480p ~75% Fine for web/chat use
Palette optimization (FFmpeg 2-pass) ~30-40% vs naive Better colors, not worse
Trim 30s to 5s ~83% N/A (removing content)

For more GIF optimization techniques, see How to Compress a GIF and Change GIF Speed for frame rate adjustments.


Frequently Asked Questions

Does converting MP4 to GIF lose quality?

Yes, always. GIF is limited to 256 colors per frame and uses frame-based compression instead of inter-frame video codecs. Color banding is the most visible artifact — smooth gradients become stepped blocks of color. Palette optimization (FFmpeg's two-pass method) reduces this significantly, but some loss is inherent to the format. For most use cases (screen recordings, UI demos, reactions), the quality is perfectly acceptable.

What is the maximum MP4 file size I can convert?

With server-based tools like ezgif, the limit is typically 100 MB. With Pixotter, there is no hard limit — it processes in your browser, so the constraint is your device's available memory. Most modern browsers handle files up to 200 MB without issues. With FFmpeg, the limit is your disk space.

How do I make the GIF loop?

GIF supports a built-in loop flag in the file header. Most tools set this automatically. In FFmpeg, the output loops by default. In GIMP, check "Loop forever" when exporting. In Pixotter, looping is enabled by default. To create a GIF that plays once and stops, you need to explicitly set the loop count to 1 in your tool of choice.

Why is my GIF so much larger than the MP4?

Because MP4 uses inter-frame compression — it only stores the difference between frames. GIF stores each frame as a separate image (with some frame-disposal optimization). A 500 KB MP4 can easily become a 10 MB GIF. Apply the optimizations above: lower the frame rate, reduce dimensions, trim duration, and use palette optimization. See How to Compress a GIF for post-conversion size reduction.

Can I convert MP4 to GIF with transparency?

Sort of. GIF supports 1-bit transparency (each pixel is fully transparent or fully opaque — no semi-transparency). If your MP4 has a green screen or solid background, you can key it out before converting. FFmpeg supports chroma key removal via the chromakey filter. However, this is an advanced workflow. Most MP4-to-GIF conversions do not involve transparency.

Is there a way to convert MP4 to GIF on mobile?

Pixotter works on mobile browsers — it is the same browser-based converter, no app required. On iOS, the Shortcuts app can also handle the conversion using built-in media actions, though with less control over output settings. On Android, third-party apps like GIF Maker (by Kayak Studio) handle the conversion, but most upload your file to a server. For privacy, browser-based tools that process locally are the better option.



Ready to convert? Drop your MP4 into Pixotter's free converter and get your GIF in seconds. No upload, no signup, no watermark.

Also try: Compress Images