Compress a GIF

Set a target size and this tool searches for the best-looking combination of palette, scale, and frame merging that fits. Nothing is uploaded.

Nothing is uploaded No watermark No signup

This tool decodes every frame of your GIF to a full canvas, re-quantises it to a smaller palette, and re-encodes it — all locally. If you give it a target size, it tries combinations of palette size and scale until the result fits, keeping the sharpest one that does.

Compression is lossy, and there is no way around that. What you can control is which loss you take. The sections below are about picking the cheapest one.

What actually makes a GIF big

GIF stores each frame as an independent image compressed with LZW, a scheme that finds repeated byte sequences. Two consequences follow, and they dictate every compression technique:

  • No inter-frame prediction. If your GIF is a 20-second screen recording of a mostly static window, every frame still stores the entire window. Nothing is shared between frames.
  • Noise is expensive. LZW compresses runs and repetitions. A dither pattern or film grain defeats it. This is why "add noise to hide banding" and "make the file small" pull in opposite directions.

Five ways to shrink a GIF, ranked by quality per byte

  1. Cut frames you do not need. Best ratio by far, and free. The Merge identical frames option does the mechanical version: consecutive frames that are pixel-identical get collapsed and their delays added together. On screen recordings and UI demos this routinely halves the file with zero visual change.
  2. Reduce dimensions. File size scales roughly with pixel count, so 50% width costs about 25% of the pixels — typically a 60–75% size reduction. On a phone screen nobody can tell 640 px from 320 px.
  3. Reduce the palette. Going from 256 to 128 colours is usually invisible on photographic footage, because the source video never had clean gradients to begin with. Going below 64 starts to posterise; 32 is a deliberate aesthetic.
  4. Use one shared palette. Each per-frame palette costs up to 768 bytes in the file. On a 100-frame GIF that is 75 KB of pure overhead. A single global palette removes it — at the cost of banding if the frames differ a lot in colour.
  5. Convert to MP4 or WebM. Not a GIF afterwards, but 5–10× smaller for identical content. Worth knowing before you spend an hour tuning a palette.

Resizing a heavily optimised GIF can make it bigger. If a source GIF was saved with delta frames (only the changed pixels stored per frame), re-encoding it writes full frames instead — and the file can grow even though the image got smaller. Turning on Merge identical frames recovers some of that. If a re-encode comes out larger, that is why.

Size limits that actually matter

Platform limits change without announcement, and a lot of the advice online is years stale. These were checked in November 2026:

DestinationLimitNotes
Discord emoji (static or animated)256 KBHard cap. Resize to 128×128 first — emoji render tiny.
Slack custom emoji128 KBHalf of Discord's. Keep under ~20 frames.
Discord file upload (free)20 MBWas 8 MB for years, then 10 MB, raised to 20 MB in 2026.
X / Twitter post15 MBAlso max 1280×1080, 350 frames. X re-encodes GIFs to video.
WhatsApp media16 MBLarge GIFs get converted to looping video, sometimes losing the loop.
Gmail attachment25 MBBase64 encoding adds ~33%, so the real ceiling is about 18 MB.
Email body / newsletter~1 MBPractical target, not a limit. Bigger GIFs trigger image blocking.

The commonest mistake is compressing for 8 MB on Discord because that was the limit for years. It is 20 MB now. Compressing further than you need costs quality for nothing.

How to hit an exact target

Type a number into Target size and press Compress. The tool encodes, checks the byte count, and if it overshoots, reduces scale and palette and tries again — a small search rather than a single blind guess. It stops at the first setting that fits, so you get the best quality the target allows rather than the most aggressive compression available.

Fifteen attempts is the cap. If your target is genuinely unreachable — a 5 MB GIF will not become 100 KB without turning to mush — it tells you the smallest result it could produce instead of silently handing back something broken.

Questions people actually ask

Does compressing a GIF lose quality?

Yes, always. GIF has no lossless compression mode beyond LZW. What changes is which quality you lose: colour depth, resolution, or temporal smoothness. The tool shows you the result in the preview before you download so you can judge it.

Why did my GIF get bigger after compressing?

Because the original was stored with optimised delta frames and the re-encode writes full frames. Resizing can trigger this even though the image is smaller. Turn on Merge identical frames, and if it still grows, the original was already about as small as a GIF gets — try converting to WebM or MP4 instead.

What is the smallest a GIF can be?

Combination of the frame count, the palette floor (2 colours is legal, 16 is the practical floor), and the pixel count. A 128×128, 10-frame, 32-colour animation lands around 20–60 KB. Below that you are looking at a still image.

Does it keep transparency?

Yes. 1-bit transparency is preserved — the same kind GIF has always supported, where a pixel is either fully transparent or fully opaque. GIF cannot store partial transparency; if your source is a translucent PNG, the semi-transparent pixels become solid.

Is there a file size limit for the input?

No enforced limit, but the GIF is fully decoded into memory — every frame as raw RGBA. A 20 MB GIF can expand to a gigabyte or more of frame data. If the tab runs out of memory on a very large file, try the resizer at a smaller size first, or split it.

Why does the frame count change after compressing?

Only if you enabled Merge identical frames. It combines consecutive pixel-identical frames and adds their delays together, so playback is unchanged but the count drops. Timing is preserved.