Make a GIF from any part of a video
This video to GIF converter turns a short clip of an MP4, MOV or WebM file into an animated GIF. You choose where the clip starts and ends, how many frames per second it gets, how wide it is and whether it loops. The video is read and the GIF is written in your browser tab, so a clip from a private recording never leaves your phone or computer.
- Reactions and memes: a two or three second moment from a video, at 320 or 480 pixels wide, makes a GIF for a chat.
- Product and app demos: show a click path or a feature in a README, a help article or an email, where a video player may not be available.
- Screen recordings: flat interface colors are what the encoder used here handles best, as explained under colors and palettes below.
Frame rate, width and file size
A GIF stores every frame as a complete picture, so its size grows with three things you control: the number of frames (clip length times frame rate), the number of pixels per frame (width times height) and how much each frame changes. Doubling the width makes four times as many pixels. That is why the tool shows an estimated file size before you start: it encodes a few frames from your clip with your settings and multiplies by the number of frames. The actual size appears when the GIF is done. Sizes on this page count 1 MB as 1,024 × 1,024 bytes.
The estimate turns into a warning above 20 MB, since a GIF that large is slow to load and send. To shrink it, cut the clip shorter first, then lower the width, then the frame rate. 10 to 15 frames per second is a good place to start; 5 fps gives a choppy, flip book look.
The GIF89a format stores the delay of each frame in hundredths of a second. 30 frames per second would need 3⅓ hundredths per frame, which cannot be stored, so the tool alternates delays of 3 and 4 hundredths. Over the whole clip the timing stays within half a hundredth of a second of the original. 5, 10, 20 and 25 fps divide evenly and need no rounding.
Colors and palettes
Each frame of a GIF uses a color table of at most 256 colors. A video frame has many thousands, so the encoder has to pick the 256 that represent the frame best and map every pixel to the nearest one. This tool uses gifenc for that, which picks the colors with a pairwise nearest neighbor method and does not dither. Its own documentation says it is best suited to flat graphics rather than photographs or video, so expect visible steps in smooth gradients such as skies or skin. Screen recordings, cartoons and logos come out cleanest.
With One per frame, every frame gets its own best table. With One for the clip, the tool builds one table from six frames spread over the clip and uses it everywhere. That keeps a still background from shifting color between frames and saves a little space, but a clip with very different scenes may lose some colors. Fewer colors (128, 64, 32 or 16) make the file smaller and the picture coarser; 256 is the right choice for most video.
Loop forever or play a number of times
A GIF can store how often it plays. Loop forever writes a loop count of 0, which means endless repetition. Play once leaves the loop block out of the file. Play 3 times writes a loop count of 2, because the stored number counts the repeats after the first play; the GIF decoder that Chrome uses reads it that way.
Phones, tablets and browsers
Where the browser has the WebCodecs VideoDecoder, the tool decodes the video with it through the mediabunny library. According to MDN's compatibility data, that is Chrome and Edge 94 and later, Firefox 130 and later on the desktop, and Safari 16.4 and later, including Safari on iPhone and iPad. Firefox for Android has no VideoDecoder, and some files use a codec the decoder in your browser cannot read. In those cases the tool moves a hidden video player to each frame time and draws the picture, which works with anything the browser can play but takes longer. The GIF itself is encoded in a background thread on every device.
On iPhone and iPad, WebKit limits the area of a canvas, the drawing surface the frames go through, so very large videos are scaled to fit before they are reduced to the GIF width. Building a GIF also needs memory for every frame in progress. If a long clip at a large width fails on a phone, try a shorter clip or 320 pixels.
How to make a GIF from a video
- 1Drop a video file on the box or tap it to choose one from your device.
- 2Drag the start and end handles, or play the video, pause at the moment you want and press Start at current frame or End at current frame. Press Play the clip to check it.
- 3Set the frame rate, width, loop and colors, and watch the estimated file size.
- 4Press Make GIF, check the preview and press Download GIF.
Already have a GIF and want a small video instead? The GIF to MP4 converter goes the other way. To keep only the sound of a video, use MP4 to MP3.
Open-source libraries
This tool runs on two open-source libraries: mediabunny (MPL-2.0) reads the video and decodes its frames, and gifenc (MIT) picks the colors and writes the GIF.
Sources
- GIF89a specification: color table of up to 256 entries, frame delay in hundredths of a second
- Wuffs GIF decoder: the stored loop count means repeats after the first play, and a missing loop block means one play
- gifenc README: color quantizer, no dithering, best suited to flat graphics
- MDN: Web video codec guide: video compression records the differences between frames
- WebKit source, CanvasBase.cpp: a smaller maximum canvas area on iPhone and iPad
- MDN: VideoDecoder browser compatibility: Chrome and Edge 94, Firefox 130 on the desktop, Safari 16.4, not Firefox for Android
Frequently asked questions
Is my video uploaded?
No. Your browser reads the frames of the video and writes the GIF on your own device. Nothing is sent to a server, so private clips stay with you, and there is no upload to wait for.
Which frame rate should I pick?
Start with 10 to 15 frames per second, which keeps the file small, and go up to 20 or 30 only if fast motion looks jerky. Every frame adds to the size: halving the frame rate halves the number of frames, and the file shrinks roughly in step.
Why is my GIF so much bigger than the video?
A video codec records mostly the differences from one frame to the next. A GIF stores every frame as its own picture with at most 256 colors, compressed without loss. Lower the width, the frame rate or the clip length to make it smaller; the estimate updates as you change them.
Why do the colors look grainy or banded?
A GIF frame can only use up to 256 colors, so smooth gradients like a sky have to be reduced to steps. The encoder used here does not dither. Keep 256 colors for video, and try One palette for the whole clip if colors flicker from frame to frame.
What does Play 3 times do?
The GIF plays three times and then stops on its last frame, in browsers that follow the loop count stored in the file. Loop forever is what most people want for chat and social posts. Play once shows the clip a single time.
Does it work on iPhone and Android?
Yes, in a current browser. On iPhone and iPad with Safari 16.4 or later, and in Chrome on Android, the frames are decoded with WebCodecs. Firefox for Android has no WebCodecs video decoder, so there the tool steps through the video frame by frame, which is slower. If a long clip at a large width fails on a phone, try a shorter clip or a smaller width.
Can I add text or crop the video first?
Not in this tool. Trim, crop or caption the video first, then turn the result into a GIF here. To cut the clip, the start and end handles are enough: only that part becomes the GIF.