Convert MP4 to GIF
FFmpeg Online — Run FFmpegin Your Browser
Convert your MP4 file to GIF right in your browser. Nothing is uploaded, nothing is installed, and your files never leave your device.
Convert, compress, trim, and process video & audio locally. Files never leave your device. No signup. The real FFmpeg.- 100% private — nothing is uploaded
- Free, no account
- Real FFmpeg — any command runs
Convert MP4 to GIF — tool
Loading the tool…
What this does
This tool converts MP4 files to GIF in your browser. It runs the real FFmpeg, compiled to WebAssembly, right inside your browser — nothing is installed, no account is needed, and your files are never uploaded to a server. Add a MP4 file, press Run, and download the GIF — the output matches what you would get from FFmpeg on the command line.
About the formats
MP4 is the most widely used video format.
The GIF is made with a two-pass color palette in a single command, for a high-quality GIF with cleaner colors than a basic converter. By default it takes the first 5 seconds at 12 fps and 480 px wide; you can change all three.
The FFmpeg command
This is the exact command the tool runs for you. Copy it to run the same conversion with FFmpeg on your own machine.
ffmpeg -ss 0 -to 5 -i input.mp4 -vf 'fps=12,scale=480:-1:flags=lanczos,split[a][b];[a]palettegen=stats_mode=diff[p];[b][p]paletteuse=dither=bayer:bayer_scale=4' -loop 0 output.gif How to choose GIF settings
GIF is an old, inefficient format, so file size depends almost entirely on three settings: how long the clip is, its frame rate, and its width.
Length: size grows in step with duration, so 10 seconds is about twice the size of 5. Pick the moment you need in the time range rather than the whole video. Frame rate: 12 fps (the default) looks smooth for most clips; 8–10 fps is fine for screen recordings and saves space; go up to 20 fps for fast motion. Width: this has the biggest effect, because size grows with the area of the frame. 480 px wide suits chat apps and docs, 240–320 px is good for small reactions, and 720 px is for when detail matters more than size.
| Settings | GIF size |
|---|---|
| 5 s · 12 fps · 240 px | 1.0 MB |
| 5 s · 8 fps · 480 px | 3.5 MB |
| 5 s · 12 fps · 480 px (default) | 4.7 MB |
| 5 s · 20 fps · 480 px | 6.5 MB |
| 10 s · 12 fps · 480 px | 9.4 MB |
| 5 s · 12 fps · 720 px | 11.0 MB |
Measured on a 1080p animated clip with this tool's exact command. Your sizes will differ: busy, fast-moving footage makes bigger GIFs than a static screen recording.
Why these GIFs look better
A GIF can only use 256 colors. A basic converter maps every frame to a fixed, generic palette, which is what causes the banding and blotchy gradients you see in low-quality GIFs.
This tool runs FFmpeg's two-pass palette method in a single command: the first pass (palettegen) looks at your clip and builds the 256 colors that fit it best, and the second pass (paletteuse) draws every frame with that palette, using light dithering to smooth gradients. Frames are scaled with the Lanczos filter, so edges and text stay sharp.
Same commands. No limits.
Test in your browser free — run at scale on Rendi's FFmpeg API. n8n, Zapier & Make integrations.
Frequently asked
Why is my GIF so big?
GIF compresses video poorly, so a GIF is usually many times larger than the MP4 it came from. To shrink it, shorten the time range first, then lower the width (size grows with the area of the frame), then the frame rate. Halving the width cuts the file to roughly a quarter.
Can I convert the whole MP4, not just 5 seconds?
Yes. The tool starts with the first 5 seconds because GIFs of long videos get very large, but you can set the time range to any part of the video, or all of it. Expect roughly 1 MB per second at the default settings.
Will the GIF loop?
Yes. The GIF is saved to loop forever, which is how GIFs play in chat apps, browsers and social posts.
Does the GIF keep the sound?
No. The GIF format has no audio track, so the sound from your MP4 is dropped. If you need sound, keep it as a short MP4 instead.
GIF or animated WebP?
Use GIF when it has to work everywhere, including older apps and email. Use animated WebP when it only needs to play in modern browsers: it is usually much smaller for the same clip and has better colors. There is an MP4 to WebP converter on this site too.
Is it really private?
Yes. FFmpeg runs entirely in your browser via WebAssembly. Your files are never uploaded, streamed, or seen by any server — including ours.
What's the file size limit?
Around 2 GB, and it's a browser limit rather than ours. WebAssembly can only address so much memory, so the whole job has to fit in the tab. Lightweight operations that copy streams instead of re-encoding (trimming, remuxing, stripping the audio track) work on files right up near that ceiling, because the file is read in place instead of being copied into memory. Full re-encodes need room for the input, the output, and working memory at once, so their practical ceiling is lower — lower still on phones. For anything bigger, the exact same command runs with no size limit on the Rendi API.
Does it work on my phone?
Yes. It's a web page, so it opens in Safari or Chrome on a phone the same way it does on a laptop: nothing to install, and your files still never leave the device. The layout is built for touch, and the Run button stays pinned to the bottom of the screen while you work. What changes on a phone is memory — there's much less of it, so the size limits are halved: the tool stops at files over about 1 GB, and it refuses re-encodes over 500 MB instead of letting the tab crash mid-run. Trimming, remuxing and extracting audio stay cheap, so those are the jobs a phone handles best. For a long video or a heavy encode, send the same command to the Rendi API; that works from a phone just as well.