How to Make a GIF Smaller (and Why Some Tools Make It Bigger)
Size and frame count do most of the work (77.0% smaller on our full-motion test, loop length unchanged), and storing only what changes is what keeps re-encoding from making a GIF bigger.
Why GIFs Are Big
A GIF is a stack of images, each limited to 256 colors and compressed with LZW, a method that shrinks long runs of repeated values. It has no motion prediction of the kind video formats use, so a few seconds of footage can weigh more than a video file of the same clip. Making a GIF smaller means storing fewer pixels, fewer colors, fewer frames, or less of each frame.
The Four Levers, Measured
We made two 4-second, 15 fps GIFs with FFmpeg’s palette filters, a full-motion test pattern and a mostly static “screen recording” with one small moving element, and ran them through our GIF Compressor in Chromium:
| Setting | Full motion | Screen-capture style | ||
|---|---|---|---|---|
| Original | 413 KB | 52 KB | ||
| Same size, 128 colors | 349 KB | 15.5% smaller | 51 KB | 1.7% smaller |
| Same, without changed areas | 456 KB | 10.3% larger | 89 KB | 71.4% larger |
| 75% size, 64 colors, every 2nd frame | 95 KB | 77.0% smaller | 22 KB | 57.4% smaller |
| 50% size, 32 colors, every 2nd frame | 46 KB | 88.9% smaller | 10 KB | 79.7% smaller |
The size and the frame count do most of the work: three-quarters of the width and every second frame took the full-motion GIF from 413 KB to 95 KB. Colors matter less on their own. And dropping frames does not have to speed the animation up: each kept frame can take the time of the frame it replaces, so every output above kept the original 4.00-second loop.
Store Only What Changes
The lever most people never see is inside the file. After the first frame, a GIF frame can be a small rectangle placed anywhere on the canvas, and pixels that should stay as they were can be marked transparent. Encoding only the changed area, with unchanged pixels inside it left transparent, gives LZW long runs to compress. Switching that off made our re-encoded GIFs 10.3% and 71.4% larger than the originals, while leaving it on saved 23.3% and 42.7% against the same settings. FFmpeg’s GIF encoder already does this by default (its offsetting and transdiff flags), which is why its output shrinks only a little until you change the size or frames.
Frames Are Not Always Full Pictures
Because frames can be partial, each one carries a disposal method in the GIF89a specification: leave it in place, clear its area to the background, or restore what was there before it. A tool that reads the stored frames without replaying those rules gets fragments. That matters when you turn a GIF into a sprite sheet for a game or a CSS animation: our GIF to Sprite Sheet converter replays every frame the way a browser plays it, and on test GIFs using all three disposal methods its sheets matched Pillow’s fully composited frames exactly (0 pixels differed).
Timing Has a Resolution of 10 ms
GIF frame delays are stored in hundredths of a second, so 33 ms (30 fps) cannot be stored exactly; it becomes 30 or 40 ms. When you build a GIF from frames, pick delays that are multiples of 10 ms.
When Not to Use a GIF
For anything long or photographic, a short MP4 or WebM video is usually far smaller. Keep GIFs for short loops, reactions and places that accept only images.
Compress a GIF
Resize, fewer colors, drop frames at the same speed, store only changed areas.
Frequently Asked Questions
What is the best way to reduce a GIF's file size?
Does removing frames make a GIF play faster?
Why did re-saving my GIF make it bigger?
Why are frame delays rounded?
Why do some GIF frame extractors give broken frames?
Published Oct 14, 2026 by Derek Giordano