GIF Optimizer

Reduce GIF file size with advanced optimization controls. Fine-tune colors, dithering, and frame rate — all in your browser.

Upload Video

Drop a video file here, or click to browse

Supports MP4, WebM, AVI, MOV, MKV and more

Max file size: 2GB (recommended: under 200MB)

Everything About GIF Optimization

Why GIFs get bloated, how palette-based compression works, and how to squeeze every unnecessary byte out of your animated GIFs.

How GIF Compression Actually Works

GIF uses LZW (Lempel-Ziv-Welch) lossless compression, but the format is inherently limited to 256 colors per frame. This color ceiling is the single biggest constraint on GIF file size and quality. When a GIF was originally created with a poor palette, or with a palette optimized for a different use case, re-encoding it with a fresh palette can dramatically reduce file size without visible quality loss.

GIF Optimize uses FFmpeg's two-pass palettegen/paletteuse pipeline — the same technique professional GIF creators use. The first pass analyzes every frame of your GIF and generates an optimal palette. The second pass re-encodes the GIF using that palette with advanced dithering to maximize visual fidelity within the 256-color limit.

The Two-Pass Optimization Pipeline

Pass 1: Palette Generation (palettegen)

FFmpeg analyzes every frame of your GIF and determines the optimal set of colors to represent the entire animation. You control how many colors to include (16 to 256) and whether to use "diff" mode, which weights colors based on frame-to-frame differences rather than treating all frames equally. Fewer colors means a smaller palette table and better LZW compression, but may introduce more visible banding in smooth gradients.

Pass 2: Re-encoding with Dithering (paletteuse)

In the second pass, each frame is re-encoded using the generated palette. Dithering is applied to approximate colors that are not in the palette by mixing nearby pixels. Sierra2_4a dithering (the default) produces excellent results for most content. Bayer dithering creates a regular pattern that compresses more efficiently. Floyd-Steinberg dithering is the classic algorithm that minimizes visible error distribution.

Dithering Methods Compared

MethodFile SizeBest For
NoneSmallestFlat colors, pixel art, icons
BayerSmallScreen recordings, UI demos
Sierra2_4aMediumGeneral purpose, best default
Floyd-SteinbergLargerPhotographic content, gradients

How Many Colors Do You Actually Need?

The default of 256 colors is not always optimal. In many cases, reducing the palette produces smaller files with identical visual quality:

Use 64-128 Colors When:

  • -Screen recordings with text and UI elements
  • -Pixel art or illustration content
  • -Animations with mostly solid flat colors
  • -File size is more important than perfect quality

Use 192-256 Colors When:

  • -Photographic or video-sourced content
  • -Gradients and smooth color transitions
  • -Skin tones and natural textures
  • -Quality is the top priority

Additional Size Reduction: FPS and Width

Beyond palette optimization, reducing frame rate and dimensions has a dramatic effect on file size:

Frame Rate Reduction

If your GIF was originally encoded from a 24fps or 30fps video, reducing it to 12-15fps can cut file size in half with minimal perceived quality loss. The human eye perceives smooth motion at around 12fps for most content. Setting a target FPS in GIF Optimize applies an fps filter before re-encoding, removing the extra frames.

Width Scaling

GIF file size scales with the square of the dimensions. Reducing a 800px GIF to 400px does not just halve the size — it quarters it. If your GIF is displayed smaller than its actual resolution, downscaling it to match the display size is one of the most effective optimizations available. GIF Optimize maintains aspect ratio automatically when you set a target width.

Related GIF Tools

Need to create or convert GIFs, not just optimize them?

Frequently Asked Questions

Everything you need to know about Convert Media.