How to make a GIF from a video and keep it small
How to make a GIF from a video: the steps, measured file sizes for each width and frame rate, why GIFs get so big, and when a short MP4 is better.
How to make a GIF from a video and keep it small
Key takeaways
- Two to four seconds, 320 or 480 pixels wide and 10 to 15 frames a second suits most GIFs.
- Doubling the width from 320 to 640 pixels made the measured GIF 3.7 times larger.
- The same four seconds were 52 times larger as a GIF than as an H.264 MP4 at 480 pixels.
- Crop to the subject and cut seconds before touching any other setting.
To make a GIF from a video, pick two to four seconds that make sense on a loop, shrink them to 320 or 480 pixels wide, choose 10 or 15 frames a second, and export. Length, width and frame rate decide the file size almost by themselves, and a GIF is far larger than the same seconds of video. This guide gives the steps, measured sizes for every setting, the reasons GIFs get big, and when to send a short video instead.
The quick way: video to GIF in four steps#
With the free video to GIF tool:
- Drop the video. MP4, MOV or WebM. It stays on your computer.
- Drag the two handles around the seconds you want. The tool starts with the first four.
- Choose a width and a frame rate. Widths are 320, 480 or 640 pixels; rates are 10, 15 or 20 frames a second.
- Make the GIF. It loops, has no watermark, and saves to your downloads.
If the clip needs other work first, do it before you convert. Trim and crop the video to the moment and the part of the frame that matters: cropping away a static half of the picture shrinks the GIF more than any setting.
How big will it be? Measured#
We made GIFs of the same four seconds of a public-domain talking-head video (1080p, a man speaking, steady background) with FFmpeg, using a palette built from the clip and error-diffusion dithering.[1] The free tool uses its own encoder, so its files will differ somewhat, but the pattern is the same.
| Width | 10 frames a second | 15 frames a second | 20 frames a second | The same 4 s as MP4 (15 fps) |
|---|---|---|---|---|
| 320 px | 1.2 MB | 1.7 MB | 2.1 MB | 0.04 MB |
| 480 px | 2.6 MB | 3.7 MB | 4.6 MB | 0.07 MB |
| 640 px | 4.5 MB | 6.4 MB | 8.0 MB | 0.11 MB |
Three patterns to take from it:
- Width is the strongest lever. Going from 320 to 640 pixels multiplied the size by 3.7, because it's four times the pixels.
- Frame rate is close to proportional. Ten frames a second made a file about 70 percent the size of fifteen.
- The MP4 was about 40 to 57 times smaller. At 480 pixels, 3.7 million bytes of GIF against 72 thousand of H.264.
And by length, at 480 pixels and 15 frames a second: 2 seconds came to 1.9 MB, 4 seconds to 3.7 MB, 6 seconds to 5.4 MB and 10 seconds to 8.8 MB. Every second costs about the same again.
- GIF, 20 fps4.59million bytes
- GIF, 15 fps3.73million bytes
- GIF, 10 fps2.61million bytes
- GIF, 15 fps, no dither2.14million bytes
- MP4, 15 fps0.07million bytes
- Video against GIF: 1.9% · MP4 bytes / GIF bytes
One clip can't stand for all of them. A cartoon with flat colours makes a smaller GIF than this; a handheld shot of trees makes a much larger one.
Why GIFs are so large#
A GIF is a stack of pictures, and the format dates from 1987.[2] Each picture uses a palette: a table of at most 256 colours. Every pixel is stored as a number pointing into that table, and the numbers are then packed with a lossless method called LZW.[3][2]
That design is good at flat areas and repeated patterns, like a logo. It's poor at photographs, where neighbouring pixels are nearly but not quite the same and nothing repeats. Video codecs do something GIF can't: they describe how blocks of the last picture moved, so a head that shifts slightly costs almost nothing. A GIF can skip pixels that haven't changed at all, and real footage almost never has any, because camera noise changes every pixel a little in every frame.
- 01 → Cut the secondsTwo to four is plenty
- 02 → Scale down320, 480 or 640 px
- 03 → Fewer pictures10 to 20 a second
- 04 → Choose a paletteAt most 256 colours
- 05 → DitherFake the colours between
- 06 → Pack with LZWLossless, per picture
Dithering: smoothness against size#
With 256 colours, a soft gradient (a sky, a cheek, a blurred wall) turns into visible bands. Dithering hides them by scattering dots of two nearby colours, so the eye mixes them. It looks much better and compresses worse, because scattered dots are the opposite of repetition. In our measurement the same clip was 3.7 MB with dithering and 2.1 MB without, about 43 percent smaller. Banding is the usual price, and you can judge it by making both and looking.
Keep dithering for people and nature. Turn it off, where a tool lets you, for screen recordings, drawings and anything with flat colour.
Choosing the settings#
| For | Width | Frames a second | Length |
|---|---|---|---|
| Chat reaction | 320 px | 10 to 15 | 2 to 3 s |
| 320 px | 10 | 2 to 3 s | |
| Help article or readme | 480 to 640 px | 10 | 3 to 6 s |
| Product moment on a page | Use a video instead | ||
| Sport or dance | 320 to 480 px | 15 to 20 | 2 s |
Match the frame rate to the motion. Talking and slow movement read fine at 10. Fast hands and dancing need 15 or more, at which point the file grows, so cut seconds to pay for it.
Match the width to where it'll be shown. A chat window shows a GIF a few hundred pixels wide. Sending 640 pixels into a 300-pixel bubble is four times the data for nothing.
Choose the seconds last. Find the shortest stretch that still makes sense. Cut the wind-up and the follow-through; on a loop they're what makes it drag.
- Does it need sound, or run past about six seconds?
- yes → Send a video
- no → Does the place play short videos inline?
- yes → Send a short MP4
- no → Make a GIF: 320 to 480 px, 10 fps
A worked example: a three-second reaction#
You have a 40-second clip of a friend opening a present, and the moment worth keeping is the face.
Play it through and find the face. The reaction runs from the first blink to the laugh, about five seconds, but the part that reads on a loop is shorter: eyes widen, mouth opens. That's two and a half seconds. Set the handles there.
Next, the frame. The friend fills the middle third of a wide shot, and the rest is sofa. Crop the video to a square around the face first. The GIF now spends every pixel on the thing people will look at, and at 320 pixels wide the face is larger than it would have been at 640 uncropped.
Choose 10 frames a second and make it. Look at two things: does the loop jump, and is it still funny the fifth time? If it jumps, move the end back a few frames to where the mouth is still opening, so the cut hides in the movement. If it drags, take half a second off the start.
From our measurements, two and a half seconds at 320 pixels and 10 frames a second should land well under 1 MB. If you'd kept the whole five seconds, uncropped, at 640 pixels and 20 frames, you'd be near 10 MB for a worse result.
GIFs of a screen#
A screen recording is the one kind of footage GIF was made for: flat colours, sharp edges and large areas that don't change. It can stay small at a generous width, if you help it.
- Record a small window, not the whole screen. Resize the program to about 800 × 600 before recording, so the text is large when you shrink it.
- Turn off what moves by itself. A blinking cursor, a spinner, a video advert or a busy wallpaper changes pixels in every frame and undoes the saving.
- Move the pointer once, in a straight line, and let it rest before each click. Wandering costs size and attention.
- Skip dithering where the tool lets you choose. Flat interface colours fit in 256 without it.
- Use 10 frames a second or fewer. Nobody needs to see a menu open smoothly.
- Show one action. "How to rename a file" is a GIF. "How to set up the project" is an article with three GIFs, or a video with a voice.
If the text can't be read at 640 pixels wide, a GIF is the wrong tool. Crop closer, or take a still and draw an arrow on it: the frame tool saves any frame as a full-size picture.
GIF and its rivals#
Several newer formats can hold a moving picture. The reason GIF survives isn't quality; it's that everything opens it.
| Format | Colours | Sound | Opens nearly everywhere? |
|---|---|---|---|
| GIF | 256 in each picture | No | Yes |
| APNG | Full | No | In browsers; patchy elsewhere |
| Animated WebP | Full | No | In browsers; many chat apps |
| Animated AVIF | Full | No | In newer browsers |
| MP4 (H.264) | Full | Yes | Yes, as a video |
MDN's format guide makes the comparison in detail: GIF is limited to 8-bit indexed colour, APNG supports deeper colour, and newer formats compress animation much better.[2] For your own web page, one of those or a video is the better choice. For sending to somebody whose software you can't see, GIF or MP4 is.
One thing GIF does that a video can't: it behaves as a picture. It can sit inside a table, a comment, a slide or a signature, anywhere an image is allowed, with no player around it and nothing to press. When that's what you need, the size is the price of it.
When a short video is the better GIF#
Many of the "GIFs" you see online are silent videos set to loop. Google's web developer guide shows the trade on one example: a 3.7 MB GIF became a 551 KB MP4 and a 341 KB WebM.[4] To make a video behave like a GIF on a web page it needs four attributes: play by itself, loop, stay muted, and play in place rather than full screen.
<video autoplay loop muted playsinline>
<source src="demo.webm" type="video/webm">
<source src="demo.mp4" type="video/mp4">
</video>
Use that on your own site. Use a GIF where video isn't an option: most email, many documentation systems, presentation software, and chat tools that treat video as a download.
The loop tool repeats a clip 2 to 10 times inside one MP4, which helps where a video plays once and stops. The mute tool makes it silent.
Size limits to know#
- GitHub accepts images and GIFs up to 10 MB in issues, pull requests and comments, and recommends H.264 for videos.[5] At 640 pixels and 10 frames a second, that was about eight seconds of our clip.
- Discord gives 20 MB as the limit for people without Nitro.[6]
- Email has no GIF limit of its own, but a message with a 5 MB picture loads slowly on a phone. Stay near 1 MB, and make sure the first frame makes sense by itself in case a mail program shows only that.
If a GIF is over a limit, change settings in this order: shorten it, shrink the width, lower the frame rate, then reconsider whether it should be a GIF. If it's already a video file that's too large, compress the video instead of converting it.
Making it loop well#
A good loop has no visible seam. A few ways to get one:
- Start and end on the same pose. A nod, a blink, a hand returning to the table. Find two frames that match and cut exactly there.
- Cut on motion. If the poses don't match, end during fast movement; the jump hides in it.
- Use stillness. Hold the last frame for half a second so the loop has a beat before it starts again. Without it, a fast loop is tiring.
- Go forwards and backwards. Playing the clip and then its reverse always meets in the middle. The reverse tool makes the second half and the merge tool joins them. It suits waves and smiles, and looks absurd for falling objects.
A still background loops better than a moving one. If the camera drifts, crop tighter until the drift doesn't show.
For a loop on a television rather than a web page, read looping a video on a TV from USB.
From a phone, and from a live photo#
Phones can turn a short clip into a GIF, but the choices are usually hidden: you get whatever width and frame rate the app decided on. If the size matters, send the original video to a computer and convert it there, where you can see the numbers.
Two things to watch. Phone video is often recorded at 60 frames a second, so a tool that copies the rate makes a file many times larger than it needs to be; sample it down to 10 or 15. And phones often record in high dynamic range, which has to be converted to ordinary colour before a 256-colour palette can do anything sensible with it.
Words and accessibility#
GIFs have no sound and no captions, so any words must be in the picture. Keep them few, large and high in contrast; with a 256-colour palette, small coloured text breaks up. Add the text to the video first with the text tool, then convert.
Movement that starts by itself and lasts more than five seconds beside other content should come with a way to pause, stop or hide it, according to the web accessibility guidelines.[7] A looping GIF never stops, and a page can't pause it. Three things help: keep it short, stop it after a few loops if your tool allows, or use a video with controls. Avoid flashing. And write alternative text that says what happens, not "funny gif".
Common problems#
The colours look wrong#
The palette had to cover too many colours. Shorten the clip to one scene: every cut to a new scene asks the same 256 colours to do more.
It looks grainy#
That's dithering. Make the GIF smaller on screen, where the dots blend, or turn dithering off and accept some banding.
It plays slowly#
Programs differ in how fast they'll play a GIF, and a page full of them slows down on an older phone. Lower the frame rate, so the file doesn't ask for more pictures than will be shown.
It stops after one loop#
The file wasn't marked to repeat, or the program ignores the mark. The free tool's GIFs loop forever.
The file is huge#
Check the length first. Ten seconds at 640 pixels is a large file whatever else you do.
The edges are jagged#
GIF transparency is on or off, with no soft edge. Put the subject on the colour of the page it'll sit on, or use a different format: MDN notes that newer animated formats support more colours and compress better.[2]
Discord, Nitro and GitHub are trademarks of their owners. Azelify isn't affiliated with or endorsed by them.
Frequently asked questions#
How do I turn a video into a GIF for free?#
Open a browser-based converter, choose two to four seconds, pick a width of 320 to 480 pixels and 10 to 15 frames a second, and download. No account is needed and nothing has to be uploaded.
How long should a GIF be?#
Two to four seconds for a reaction, up to six for a demonstration. In our measurements each second at 480 pixels and 15 frames a second added about 0.9 MB.
What frame rate is best for a GIF?#
Ten frames a second for talking and screens, fifteen for ordinary movement, twenty only for something fast and short.
Why is my GIF bigger than the video?#
GIF stores each picture with at most 256 colours and can't describe motion, while video codecs store mostly the changes. Our four-second test was 52 times larger as a GIF at 480 pixels.
Can a GIF have sound?#
No. The format has no sound. If you need sound, share a short video.
Sources
-
Our own measurement: four seconds of one public-domain 1080p talking-head video, FFmpeg palettegen and paletteuse with sierra2_4a dithering; MP4 is H.264 at CRF 23 without sound; one clip (accessed 2026-11-30). ↩
-
MDN Web Docs, Image file type and format guide, developer.mozilla.org (opens in a new tab) (accessed 2026-11-30). ↩ ↩[2] ↩[3] ↩[4]
-
CompuServe, GRAPHICS INTERCHANGE FORMAT, Version 89a, www.w3.org (opens in a new tab) (accessed 2026-11-30). ↩
-
Google, web.dev, Replace animated GIFs with video for faster page loads, web.dev (opens in a new tab) (accessed 2026-11-30). ↩
-
GitHub Docs, Attaching files, docs.github.com (opens in a new tab) (accessed 2026-11-30). ↩
-
Discord, File Attachments FAQ, updated 2026-09-30, support.discord.com (opens in a new tab) (accessed 2026-11-30). ↩
-
W3C, Understanding Success Criterion 2.2.2: Pause, Stop, Hide, www.w3.org (opens in a new tab) (accessed 2026-11-30). ↩
Make the GIF now
Pick the seconds, the width and the frame rate, and download a looping GIF. Free, no upload, no watermark.
Make a GIFKeep reading
How to compress a video without losing quality you can see
How to compress a video for email, Discord or any limit: current size limits, the one formula behind every result, and measured quality at each size.
How to trim and crop a video online without losing quality
Trim and crop a video free in your browser, crop to 9:16, 1:1 or 4:5, and the honest answer on quality: lossless cuts, re-encodes and what the tools do.
More in Edit video online
How to add captions to a video: burned in, SRT or automatic
How to add captions to a video free: burn them in, make an SRT, or fix automatic ones, with reading speeds and words per page measured from real speech.
How to compress a video for PowerPoint so it plays anywhere
How to compress a video for PowerPoint: the format Microsoft recommends, sizes for a slide or full screen, and why clips won't play on the day.
How to turn a horizontal video into a vertical one
How to make a horizontal video vertical for Shorts, Reels and TikTok: crop, fit, stack or follow, what each does to sharpness, and how to choose.