image · 6 min read

How to make a GIF smaller

The quality slider you are looking for does not exist. What makes a GIF large is the shape of the format itself.

Someone hands you a 12 MB animation and a form that will accept 2 MB. The instinct is to look for a compression setting, and the reason none of them helps much is worth thirty seconds of explanation — it decides which of the remaining options is the right one.

How to get a GIF under 100 KB

Cut frames, then colours, then size

Halve the frame rate, reduce the palette, and shrink the dimensions — in that order, because each one multiplies against the others. For anything longer than a couple of seconds, converting it to video is the only reliable way there.

Every frame is a whole picture

This is the entire explanation, and everything else follows from it.

A video codec looks at frame two, notices that it is almost identical to frame one, and stores the difference. On a screen recording where only a cursor moves, that difference is a few hundred bytes. Thirty frames of a still background cost barely more than one.

A GIF has no such idea. Each frame is compressed by itself, with a method published in 1987, and the file is those results in sequence. Five seconds at twenty-four frames a second is a hundred and twenty independent images, and the fact that a hundred and nineteen of them show mostly the same wall is information the format cannot use.

The gap this produces is not marginal. The same clip as video routinely comes out ten to a hundred times smaller — a common example is a screen recording of a few seconds weighing several megabytes as a GIF and a couple of hundred kilobytes as video. No setting inside the format closes that.

The 256-colour ceiling, and how to use it

A GIF stores a list of at most 256 colours and then records each pixel as a position in that list. That ceiling is why photographs look dithered and gradients look striped in a GIF, and it is also the one lever the format gives you.

Cutting the palette to 64 or 32 colours makes the stream of indices far more repetitive, and repetition is exactly what the compressor rewards. On flat graphics, screen recordings and line animation the saving is large and the damage is invisible. On anything photographic it bands, and banding is the visible edge of that ceiling rather than a fault in the encoder.

The three levers, in the order that pays

Frames. Halve the rate and watch it once. Most captures run at far more frames a second than their content needs, and removing every second frame removes close to half the file. Ten a second is comfortable for a screen recording; below fifteen, real motion begins to stutter.

Colours. Then reduce the palette, for the reason above.

Dimensions. Then make it smaller on screen. This one is multiplicative and often forgotten: halving the width and the height removes three quarters of the pixels in every frame at once, which beats any per-frame setting.

Trimming the clip is the fourth and largest lever when it is available at all. Two seconds of a five-second loop is two fifths of the file, and most GIFs that people are trying to shrink contain a second of nothing at each end.

What this site can and cannot do with one

Worth saying plainly, because the tools accept a GIF and the result will surprise you otherwise.

The image tools here read your file through the browser’s own decoder, and what comes back is one still picture — the first frame. So compressing a GIF to a target size here gives you a still image under that size, not a smaller animation, and converting one gives you a single frame in the new format. Nothing here writes an animated file.

That is exactly right when a still is what you needed — pulling one frame out to use as a thumbnail or a preview is a real job and this does it in one step. When the movement is the point, it is the wrong tool, and the honest advice is a video encoder rather than an image one.

When a GIF should stay a GIF

The format survives on compatibility rather than merit. It pastes into a chat window, an old forum, an email signature and a document, and it plays by itself without a control bar or a click. That is a real advantage and it is the only one left.

So: keep it a GIF when it is going somewhere that will not take a video, and make it as short and as small as that destination allows. Everywhere else — a web page, a presentation, anything you control — the format is a habit rather than a decision, and leaving it is the saving that dwarfs all the others.

The short version

A GIF is large because it stores whole frames and cannot look between them. Cut the frame count, then the palette, then the dimensions, and trim the clip if you can. If the destination accepts video, that single change beats everything else combined — and if it does not, accept that a long animation may not fit under a small limit at all.

Questions

How do I compress a GIF to 100 KB?

Usually by not keeping it as a GIF. The format stores every frame as a complete picture, so a few seconds of animation is dozens of whole images glued together, and no quality slider changes that — the same clip as video is routinely ten to a hundred times smaller. If it has to stay a GIF, the levers are fewer frames, smaller dimensions and fewer colours, in that order, and a long clip may simply not reach 100 KB while still animating.

Why is my GIF so large?

Because of what the format cannot do. Video codecs store the difference between one frame and the next, which is almost nothing when the camera and the background hold still. A GIF has no such mechanism: each frame is compressed on its own, so a five-second screen recording at twenty-four frames a second is a hundred and twenty separate images in one file, none of them aware that the others exist.

Does reducing colours actually shrink a GIF?

Yes, and it is the one setting unique to the format worth touching. A GIF holds at most 256 colours per frame and stores each pixel as an index into that list, so cutting the palette to 64 or 32 makes the indices more repetitive and the compression more effective. Flat graphics and screen recordings survive this well; photographs and gradients band visibly, which is the trade you are making.

How many frames should I cut from a GIF?

Halve the frame rate first and look at it. Most GIFs are captured at far more frames a second than their content needs, and dropping every second frame removes about half the file for a result many people cannot distinguish. Screen recordings and simple animations tolerate ten frames a second comfortably; anything with real motion starts to stutter below fifteen.

Can I compress an animated GIF in this browser tool?

Not while keeping it animated. The image tools here read a file through the browser’s own decoder, which hands back a single still picture — the first frame — so compressing an animated GIF here produces a still image rather than a smaller animation. That is genuinely useful when a still is what you wanted, and it is the wrong tool when the movement is the point.

Is WebP or MP4 better than GIF for animation?

Both are dramatically smaller, and which to use depends on where it goes. Video is the smallest by a wide margin and is right for anything a viewer watches. Animated WebP sits in between, keeps the single-file simplicity of a GIF and averages roughly two thirds smaller. The one thing GIF still wins on is that it pastes into anything, which is why it has outlived every technical argument against it.

Tools from this guide

More image tools — all of them running in your browser, none of them uploading a file.