File Format Guide

What is a GIF file?

GIF has outlived nearly every format of its generation on the strength of one feature — animation that plays anywhere without a video player. Technically it has been obsolete for years, and understanding why explains most of its quirks.

GIF at a glance
What is a GIF file?
A raster image format limited to 256 colors that supports multiple frames, allowing for basic, silent animations.
How to open a GIF file?
Universally supported by browsers, OS viewers, and messaging apps.
Typical use of a GIF file:
Internet memes, simple animated graphics, and UI reaction loops.
Origin of the GIF file:
Developed by CompuServe in 1987 to download images over slow dial-up connections.
Modern alternatives for GIF:
Animated WebP, AVIF, or standard MP4 video files offer vastly superior quality and much smaller file sizes for animations.
GIF specifications
Full name Graphics Interchange Format
File extensions .gif
MIME type image/gif
Compression Lossless (LZW) — but applied after colour reduction
Colour depth 256 colours maximum per frame, from a palette
Transparency 1-bit only — each pixel is fully opaque or fully transparent
Animation Supported, with per-frame delays and looping
Introduced 1987 (GIF87a); animation and transparency added in 1989 (GIF89a)
Browser support Universal
Advertisement

The 256-colour ceiling explains everything

A GIF stores a palette of at most 256 colours and then records, for each pixel, which palette entry to use. The compression that follows is lossless — but the colour reduction that happens first is not, and it is where all the quality goes. A photograph has far more than 256 distinct colours, so converting one to GIF means discarding the overwhelming majority of them.

Encoders paper over this with dithering: scattering pixels of two palette colours in a pattern so that, from a distance, the eye blends them into a third. It works surprisingly well, but it replaces smooth gradients with visible speckle, and because the speckle is high-frequency noise it also defeats the LZW compression, which is why dithered GIFs are often larger than undithered ones.

Why transparency looks ragged

GIF transparency is a single flag: one palette entry is designated transparent, and every pixel either uses it or does not. There is no partial opacity. An anti-aliased curve or piece of text, which relies on semi-transparent edge pixels to look smooth, cannot be represented — so the encoder has to composite those edges against some background colour and make everything else fully opaque.

That is the source of the classic ugly halo: a GIF logo exported against white and then placed on a dark page shows a fringe of white pixels around every curve. PNG, WebP, and AVIF all solve this with a proper alpha channel.

Animated GIFs are enormous, and what replaced them

GIF has no concept of motion between frames in the way a video codec does — it cannot say "this region moved three pixels left". It only supports skipping unchanged rectangles. A few seconds of real footage therefore becomes a file many megabytes in size, at 256 colours, where an equivalent MP4 or WebM would be a tenth the size and look considerably better.

This is why most "GIFs" on the modern web are not GIFs at all. Social platforms and messaging apps accept a GIF upload, transcode it to video behind the scenes, and serve you an MP4 in a looping player. The word survived; the format mostly did not.

Converting GIF files

For a still GIF, converting to PNG is lossless and usually smaller — the palette comes across intact and PNG's compression is simply better. Converting to WebP or AVIF shrinks it further and lets you keep proper transparency if you re-export the edges.

For an animated GIF, animated WebP typically lands around a fifth of the size with full colour, and is supported by every current browser. Converting to MP4 or WebM saves more still, at the cost of no longer being an image — it will not work in an <img> tag or in an email.

Convert GIF files in your browser

Zolvo's image converter runs entirely on your own machine — your files are never uploaded to a server. Drop a GIF file in and pick an output format, or jump straight to a common one:

GIF — frequently asked questions

Why do GIFs look grainy or banded?

Because of the 256-colour palette. Any image with more colours than that — essentially every photograph — has to be approximated, and encoders scatter pixels of nearby palette colours to fake the missing shades. That scattering is the graininess you see.

Can a GIF have a transparent background?

Only fully transparent or fully opaque pixels — there is no partial transparency. This means anti-aliased edges cannot be represented cleanly, which is what produces the halo around GIF logos placed on a coloured background. Use PNG or WebP instead.

Is animated WebP better than GIF?

Substantially. Animated WebP supports full colour and proper transparency and is typically around five times smaller for the same clip. Every current browser supports it. The only reason to keep a GIF is compatibility with very old software or with email clients.

How do I make an animated GIF smaller?

Cut the frame rate, reduce the dimensions, shorten the clip, or trim the palette — those are the only levers GIF gives you. Converting to animated WebP or to MP4 achieves far more than any of them.

Related formats