To convert a video to a GIF, open the video above, drag the handles to the seconds you want, pick a width (480 px is a good start) and a frame rate (10 to 15 fps), then press Convert to GIF. The page builds one palette for the whole clip, encodes the frames in your browser and shows the GIF with its exact size before you download it.
How to convert a video to GIF
- Open the video. Choose a file or drop it on the box: MP4, MOV, WebM and MKV are accepted. You can also paste a
https://link to a video file. - Pick the seconds. Drag the two handles under the preview, type the start and end in seconds, or pause the preview on a frame and press Start here or End here. Play clip plays only the selection, at the chosen speed.
- Set the size and motion. Width from 240 to 800 pixels (never wider than the video), 5 to 25 frames per second, and a speed from 0.5x to 2x.
- Set the colors. 64, 128, 192 or 256 colors, with or without dithering, looping forever or playing once. The estimated size updates as you change anything.
- Convert and download. The progress bar shows the frame being encoded and where the size is heading. Cancel stops at once. When it is done, the GIF plays on the page with its final size and a download button.
What makes a good GIF
A GIF is a stack of full pictures, so every pixel of every frame costs bytes. The best GIFs are short, small and focused on one movement. Four settings decide almost everything:
- Length. 2 to 6 seconds covers a reaction, a product demo step or a bug report. The page warns above 15 seconds and stops at 60, because a minute of GIF is heavy for any page or chat.
- Width. 480 pixels is sharp in a chat or a README. Each step down saves a lot: 320 px has less than half the pixels of 480 px.
- Frame rate. 10 to 15 fps looks fluid for most clips. 20 to 25 fps helps fast motion such as sports or game footage, and doubles the frames.
- Colors and dithering. A GIF frame holds at most 256 colors. Dithering mixes neighbouring colors in a fixed pattern to hide the steps in skies, skin and shadows.
Speed is the hidden fifth setting: at 2x, a 6-second action fits in a 3-second GIF with half the frames. At 0.5x, a quick gesture becomes readable but the GIF has twice as many frames.
File size vs quality
The estimate shown before converting is a range: the first frame is a full picture, and each next frame only stores the pixels that changed, so a still camera costs far less than a moving one. While the GIF is being encoded, the progress line projects the final size from the frames already done, which is much closer.
| Change | Effect on size | Effect on quality |
|---|---|---|
| Width 480 to 320 px | 51 to 56% smaller in our tests | Softer, still fine in chats |
| 15 to 10 fps | About a third fewer frames | Slightly less fluid motion |
| 256 to 128 colors | 15 to 30% smaller in our tests | More banding in gradients |
| Dithering off | 12 to 25% smaller in our tests | Visible steps in smooth areas |
| Shorter clip | Proportional to the seconds removed | None |
When a GIF ends above 8 MB, the page lists the setting changes that would make it lighter. A GIF in a README, an email or a help article is best kept under a few megabytes, because it is downloaded in full before it plays.
GIF vs MP4 and WebM for the web
GIF is from 1987. It stores each frame as up to 256 indexed colors with lossless LZW compression, and it has no sound. MP4 (H.264) and WebM (VP9, AV1) compress the changes between frames with a video codec and keep millions of colors. On the same 4-second, 480-pixel clip at 12 fps, our tests gave:
| Format | Size | Colors | Sound | Plays in |
|---|---|---|---|---|
| GIF (this page, 256 colors, dithering) | 3.2 MB | 256 per frame | No | Everywhere an image works: chats, email, READMEs, forums |
| MP4, H.264 | 0.23 MB | Millions | Optional | Every browser and phone, as a video |
| WebM, VP9 | 0.16 MB | Millions | Optional | Current browsers, as a video |
So use a GIF where only an image is allowed: a GitHub README or issue, an email, a forum or chat that does not autoplay video, a slide. On your own website, a muted looping video does the same job at a tenth of the weight:
<video src="clip.mp4" autoplay muted loop playsinline></video>
Making the GIF with ffmpeg instead
ffmpeg makes good GIFs in two steps: palettegen computes the best 256 colors for the clip, then paletteuse maps every frame to that palette. Doing both in one filter chain looks like this:
ffmpeg -ss 2 -t 4 -i "input.mp4" -vf "fps=12,scale=480:-1:flags=lanczos,split[a][b];[a]palettegen=max_colors=256[p];[b][p]paletteuse=dither=bayer:bayer_scale=3" -loop 0 "output.gif"
-ss 2 -t 4 takes 4 seconds from the 2-second mark, fps=12 and scale=480:-1 set the frame rate and width, dither=bayer picks ordered dithering like this page, and -loop 0 loops forever (-loop -1 plays once). To change the speed, add setpts=PTS/2, at the start of the filter for 2x. The command box under the converter writes this command with your file name and your settings.
Without the palette step, ffmpeg uses a fixed generic palette and the GIF looks blotchy. ffmpeg is the better choice for batches, for very long clips, and for codecs your browser cannot decode.
How this converter works
Nothing leaves your device. The video is read from your disk; a pasted link is downloaded by your browser, up to 500 MB, and nowhere else. Then:
- Decoding. When the browser has WebCodecs (Chrome, Edge, recent Safari and Firefox), Mediabunny reads the container and decodes the exact frame at each moment, already scaled to your width. Otherwise, the page seeks the browser's own video player frame by frame and draws each frame on a canvas.
- Palette. Every frame of the clip is sampled, a share of its pixels each (4 million pixels at most in all), and one palette is computed for the whole GIF from their exact colors (median cut, then k-means), so colors do not flicker from frame to frame and a short scene still gets its own colors. With the video player fallback, which has to seek frame by frame, 16 frames spread over the clip are used instead.
- Dithering. Ordered (Bayer 8x8) dithering depends only on the position of a pixel, so a still background keeps exactly the same pattern in every frame instead of crawling. Its strength is one step of the palette: a clip with few colors gets more dithering, a smooth gradient with enough colors almost none.
- Unchanged pixels. From the second frame on, pixels identical to the previous frame are written as transparent, which costs almost nothing. That is why a GIF of a static scene with one moving object stays small.
- Encoding. Frames are encoded in parallel by up to four web workers with gifenc, then written in order. Only a few frames are in memory at once, and a GIF that passes 200 MB is stopped with advice.
- Timing. GIF delays are counted in hundredths of a second. At 15 fps the page writes 7, 6, 7, 7, 6... so the GIF keeps the length of the selection at the chosen speed, to the nearest frame, with no drift.
The sound track is ignored: a GIF cannot carry it. If the video is a stream you only have as an .m3u8 link, turn it into an MP4 first with the M3U8 to MP4 converter.