DevTools Logo

GIF Compressor

GIF Compressor

Shrink animated GIFs by tuning palette, frame rate and dithering — with byte-exact savings and a side-by-side preview.

Runs in your browser
Try an example

Source and settings

no file

15 fps · 128 colors · max 640 px · bayer dithering

Frame rate is sampled by timestamp through ffmpeg's fps filter, so uneven source delays stay in order. Transparency is preserved by the palette pipeline.

Compression result

no result

No compression yet

Choose a GIF and press Compress GIF.

Examples

Flat screencast

Input
64 colors, 10 fps, no dither
Output
typically the biggest win

No noise is added to flat color regions.

Photo animation

Input
128 colors, Bayer dither
Output
smoother gradients

Ordered dithering trades a little size for fewer color bands.

Larger output

Input
Aggressive settings on a tiny GIF
Output
honest 'keep the original' notice

Header overhead can dominate very small files.

About this tool

GIF Compressor reduces animated GIF size from the inside: palette size, frame rate, maximum width and dithering. Light, Balanced and Aggressive presets set sensible combinations, and every slider can then be tuned by hand. The compression runs on a self-hosted FFmpeg engine inside your browser tab, so a GIF is never uploaded to a server.

The encoder pipeline caps frames with FFmpeg's fps filter — sampling by timestamp rather than index, so irregular source delays stay in order — then scales with Lanczos, builds an adaptive palette from the actual frames with palettegen max_colors, and applies it with paletteuse. Dither choices map to real FFmpeg modes: none, Bayer and Sierra 2-4A (the Floyd–Steinberg family). No gifsicle --lossy flag is claimed, because the stock FFmpeg build does not provide it.

The result panel reports exact input and output byte counts and a savings percentage, not an estimate, and shows both animations side by side for a visual check. Dithering can increase entropy, so results are presented honestly: when a setting makes the file larger, the tool says so and suggests keeping the original. All encoding is local; the engine is about 31 MB, downloaded once and cached by your browser.

What this tool does not do

  • FFmpeg stock filters are used; there is no gifsicle --lossy mode.
  • No visual quality score (MAE) is computed — comparison is side-by-side and byte-based.
  • Very large GIFs decode to a lot of RAM; the browser may struggle with multi-hundred-frame sources.

How to use this tool

  1. Choose a GIF

    Pick an animated GIF. The tool reports its original byte size immediately.

  2. Pick a preset or tune settings

    Start with Balanced, then adjust frame rate, colors, width and dithering to taste.

  3. Compress

    Press Compress GIF. Progress reflects the local decoder; no upload takes place.

  4. Compare and download

    Read the exact savings, compare both animations, then download the compressed copy.

Compression controls

ControlEffect
Frame ratefps filter samples frames at requested times; irregular delays stay ordered
Palette colorspalettegen max_colors from 2 to 256
Maximum widthLanczos scale; height follows aspect ratio
Ditheringnone, Bayer, or Sierra 2-4A (Floyd–Steinberg family)
OutputAnimated GIF with looping preserved

Sizes are not guaranteed to decrease monotonically: dithering and animation content affect entropy.

Frequently asked questions

How much smaller can a GIF get?

It depends entirely on the content. Flat-color screencasts often shrink dramatically with 64 colors, 10 fps and no dithering; photographic animations need more colors and may save less. The tool reports measured input and output bytes, so you always see the real number rather than a promise.

Does reducing colors ruin quality?

It can introduce banding in gradients, which dithering helps hide at the cost of file size. Start with 128 colors and Bayer dithering, compare the two animations, and move down to 64 with dithering off only if the result still looks acceptable for your use case.

Why are GIFs so large compared with video?

GIF stores up to 256 colors per frame and uses LZW compression designed for simple graphics. Every frame can carry its own palette and delays, and there is no inter-frame motion prediction like H.264. For long animations, converting to animated WebP is usually a better optimization than compressing the GIF further.

What frame rate should I use for GIFs?

10–15 fps is usually enough for UI recordings and explainers; 24 fps is smoother but much larger. The fps filter samples by timestamp, so a source with uneven frame delays does not produce out-of-order frames when you lower the rate.

Is WebP better than a compressed GIF?

Often yes — animated WebP commonly saves 30–70% more bytes at similar quality and supports full color. Use this compressor when you must keep GIF compatibility; otherwise try the GIF to WebP converter and compare the measured file sizes.

Why didn't my output get smaller?

Dithering adds noise that is harder to compress, and a very small GIF is mostly headers. The tool explicitly tells you when the output is larger and suggests keeping the original. Try fewer colors, no dithering, or a lower frame rate before giving up.

Is my GIF uploaded anywhere?

No. Compression runs in your browser with a self-hosted FFmpeg engine. The engine itself is about 31 MB and is downloaded once from this site, then cached; your animation never leaves the tab.