Skip to main content
Image format guide

What is a GIF file?

GIF is the format of short, silent loops. It is also an old format with a strict colour limit — useful to know before you save a still image as GIF.

  • Short loops without video playback controls
  • Maximum 256 colours per frame
  • No partial transparency

GIF supports only 256 colours per frame and one level of transparency, so it is a poor choice for photographs.

Why GIFs look banded

A GIF can use at most 256 colours in a frame. A photograph contains far more than that, so the colours are reduced and smooth gradients turn into visible steps. The format also has only binary transparency: a pixel is either fully transparent or fully opaque, with no soft edges.

For a still image, PNG or WebP will look better and often be smaller. For animation, an animated WebP gives smoother colour and better compression. GIF survives because every browser and chat app understands it.

GIF dates from 1987 and was designed for a world of slow modems and tiny colour displays. Its central constraint is a palette of at most 256 colours per frame. A photograph contains thousands of distinct colours, so saving it as a GIF forces a reduction step called quantisation. Smooth gradients turn into visible bands, and dithering patterns appear as a speckled texture. The format also stores frames using LZW compression, which works well on large flat areas and poorly on fine photographic detail.

Transparency in GIF is binary. Each pixel is either fully transparent or fully opaque; there is no value in between. Anti-aliased edges in a real image rely on partial transparency to look smooth, so when those pixels are forced to opaque they take on the colour of the original background. This is the familiar white or coloured fringe around GIF cut-outs. PNG solves the problem by storing an alpha value for every pixel, which is why it is the better destination for logos and icons.

Animation is the reason GIF is still everywhere. A file can hold multiple frames, each with a delay measured in hundredths of a second, plus an instruction for what to do with the pixels left behind by the previous frame. Browsers clamp very short delays to around two hundredths of a second, which is why a GIF that looks fast in one editor plays slower online. The format loops automatically, and that self-contained loop is what made it the default language of reaction clips in chat applications.

Two versions of the specification are still in circulation. GIF87a defined the basic still format; GIF89a added animation, transparency and application extensions. Most files you encounter are 89a. Both are read by every browser, which is the format’s greatest strength: an animated GIF plays without a video player, without audio and without a plugin, in places where an MP4 would be blocked or would autoplay with sound.

For a still image, GIF is almost never the right output. PNG gives you more colours and smooth transparency; WebP gives you animation with better compression. GIF remains useful when you need a short silent loop that will work in an old email client or a chat app with strict embedding rules. If you only need one frame from such a loop, extracting it to PNG gives you a still image with the least additional quality loss.

GIF at a glance

Extension.gif
IntroducedCompuserve, 1987; GIF89a added animation
Colour limit256 colours per frame
CompressionLZW
TransparencyBinary only — fully transparent or fully opaque
AnimationYes, with per-frame delay and disposal method
Frame delay unit1/100 second, commonly clamped to 2/100 in browsers
Best forShort, silent, flat-colour loops

Where it works

Support changes between releases. The practical answer is always to convert when a tool refuses the file.

Web browsersUniversal, all versions
Chat and messaging appsThe most broadly embedded animation format
EmailOften works where video attachments do not
Photo editingWidely read, but edits are usually lossy
Smooth photographic colourPoor fit — use WebP or PNG
Transparent logosPoor fit — use PNG

When to use GIF

  1. 01

    Short loops

    Tiny animations in chat, documentation and email still favour GIF for compatibility.

  2. 02

    Simple shapes

    Flat-colour graphics survive the 256-colour limit well.

  3. 03

    Extract a frame

    Use the GIF to PNG converter if you only need one frame as a still image.

Common questions

Why does my GIF look grainy?+

The 256-colour limit forces smooth gradients into visible bands. PNG or WebP avoids this.

Can GIF have a transparent background?+

Only fully transparent or fully opaque pixels — there is no soft anti-aliased edge.

Is GIF a video format?+

Technically it is a series of images, which is why it loops without audio and grows large quickly.

How do I get one frame from a GIF?+

Use the GIF to PNG converter; it writes the first frame as a still image.

What is a GIF file used for?+

Short, silent loops in chat, documentation and email. It survives because every browser and messaging app can display it without a video player.