How to compress a GIF
- Drop one or more GIF files into the box above, or click it to choose them.
- In Compare 3 levels, wait a moment while Light, Recommended and Strong versions are made. All three play side by side, each with its new size.
- Download the one that still looks right. With several GIFs, pick a version for each and download them together as a ZIP.
- Have a hard limit to meet instead? Switch to Fit a size limit, choose a preset or type a size in KB, and the tool searches for the gentlest settings that fit.
Your original file is never changed. Every version is a new file, named after the original
with the level added (party-recommended.gif), so you can keep both.
What the three levels do
A GIF gets smaller in four ways, and they cost different things. The levels combine them from least to most visible:
| Level | Settings | What you might notice |
|---|---|---|
| Light | Frame re-optimisation, lossy 30, all colours kept | Usually nothing |
| Recommended | Lossy 80, palette reduced to 128 colours | Slight banding in smooth gradients |
| Strong | Lossy 140, 64 colours, width scaled to 75% | Visible grain and a smaller picture |
Re-optimisation is free: it stores only the part of each frame that changed since the previous one and packs the data more tightly, without touching a single pixel. Lossy compression lets the encoder use a pixel that is almost the right colour when that means it can repeat a pattern it has already stored. Fewer colours means fewer distinct values to encode. And smaller dimensions cut the pixel count directly — the most powerful step of all, because scaling a GIF to half its width leaves a quarter of the pixels.
The levels behave very differently depending on the GIF. A screen recording with flat colours often loses a third of its size at Light and barely changes after that, because it has few colours to cut. A clip taken from a film or phone video is the opposite: Light may save 10%, while Strong can take it down to a fraction. That is why the three are shown together rather than hidden behind a single slider.
Fitting a size limit
Size limit mode works through a ladder of up to twenty settings ordered from gentlest to harshest, and uses a halving search to find the first rung that fits, so a typical GIF needs a handful of attempts rather than trying every one. The order of the ladder is deliberate:
- Lossless re-optimisation, then lossy compression in steps.
- Fewer colours: 128, then 64.
- Smaller dimensions, one step at a time, but never narrower than the minimum width you set.
- Only then, and only if you allow it, fewer frames: every second, third or fourth frame is kept.
If nothing on the ladder fits, you get the smallest version the tool could make, clearly marked as over the limit, so you can decide whether to lower the minimum width, allow frame dropping or shorten the clip in the program that made it. A GIF that is already under the limit is left exactly as it is.
| Where the GIF is going | Size limit | Tip |
|---|---|---|
| Discord custom emoji | 256 KB | Emoji are shown small; 128 px wide is plenty |
| Slack custom emoji | 128 KB recommended, up to 50 frames | Square, transparent background works best |
| Email signatures and newsletters | No fixed rule; keep it well under 1 MB | Some email apps show only the first frame |
For still images that need to go into Discord, use Compress Image for Discord instead. Photos are better as JPEG or WebP than as a GIF.
What makes a GIF so large?
GIF is a format from 1987, and it stores animation in the most literal way possible: as a sequence of separate pictures, each limited to 256 colours and compressed on its own with a method that looks for repeated runs of identical pixels. Four things drive the size:
- Dimensions. A 480×270 GIF has 129,600 pixels per frame. At 720×405 it has 291,600 — more than twice as many for a picture that is only 1.5 times wider.
- Frame count. Ten seconds at 20 frames per second is 200 pictures. Many GIFs made from video keep far more frames than the motion needs.
- Noise and dithering. Film grain, camera noise and the dot patterns that converters use to fake extra colours break up the runs of identical pixels that GIF compression depends on. A noisy clip can be several times larger than a clean one of the same size.
- How much changes between frames. If only a cursor moves across a still screen, each new frame needs to store only that small area. If the camera pans, every pixel changes every frame.
Dropping frames without speeding up the animation
Each GIF frame carries its own display time, in hundredths of a second. Deleting frames while leaving the remaining times as they were makes the animation play faster than the original. When this tool keeps one frame in two, the kept frame gets the time of both: two frames of 0.05 seconds become one frame of 0.10 seconds, and the loop takes exactly as long as before.
There is one subtlety this accounts for. Browsers do not honour very short times: a frame marked 0 or 0.01 seconds is played at 0.10 seconds. Those frames are counted at the time you actually see, not the number written in the file.
When a GIF will not shrink much
Some GIFs are already as small as they are going to get without visible damage. Signs of that are a Light version that saves under 5% and a card that says no gain — original kept. At that point your options are the visible ones: fewer colours, a smaller size or fewer frames, which is what Strong and size limit mode apply.
If you only need the GIF in a place that also accepts video, an MP4 or animated WebP will almost always be smaller at better quality. If you only need one still frame, save it with GIF to PNG (transparency kept) or GIF to JPG, and shrink that with Compress Image to Target Size.
Your GIFs stay on your device
Compression runs inside your browser. The first time you use the tool, it downloads the optimiser — about 340 KB — and runs it in a background worker; your GIF is read from your disk and the results are held in memory until you download them. Nothing is sent to a server, so there is no upload wait, no file size cap beyond your device's memory, and nothing to delete afterwards. Most GIFs are done in a few seconds; a very large one — tens of megabytes of video-like frames — can take half a minute or more, and longer on a phone.
The optimiser is Gifsicle by Eddie Kohler, compiled to WebAssembly, and free software under the GNU General Public License v2; its source code is available from the Gifsicle repository. More compressors for photos and screenshots are listed under image compression tools.