GIF files

Graphics Interchange Format

GIF is one of the oldest image formats still in everyday use. CompuServe introduced it in 1987, and its support for simple animation made it a fixture of the web, from early websites to today’s reaction GIFs.

How GIF works

A GIF stores up to 256 colours, chosen from a palette for each image or frame, and compresses the pixels losslessly with the LZW algorithm. Transparency is on or off per pixel: a pixel is either fully see-through or fully visible, with no soft edges. Animation is a sequence of frames, each with its own delay.

What GIF is good at

  • Universal animation support. Every browser, chat app and social network plays GIFs.
  • Simple graphics with few colours, such as small icons and pixel art.
  • Loops: short, silent animations that play automatically.

Where GIF falls short

  • 256 colours. Photos and gradients look blotchy or dithered.
  • Hard-edged transparency. No smooth edges or shadows over different backgrounds.
  • Large animations. A few seconds of GIF can be several megabytes; the same clip as MP4 or animated WebP is often 80–90% smaller.

GIF and other formats

For still images, PNG does everything GIF does, with more colours and better compression. Convert GIF to PNG for graphics and GIF to JPG for photo-like images. Animated GIFs keep only their first frame when converted to a still format.

Convert GIF to another format