What Is a GIF? The Format Explained, and Why Yours Is So Large

What a GIF actually is, why it can only hold 256 colours, why the frame rate you choose is probably not the one you get, and when an MP4 is the better answer.

A GIF is an image file that can hold more than one frame and play them in a loop. That is the whole idea: not a video, an animated picture.

The format was designed in 1987, and almost everything people find surprising about GIFs follows from that date.

What is a GIF?

A GIF is a bitmap image format that can store a sequence of frames along with the delay between them, so that opening it plays an animation. It has no sound, it holds at most 256 colours per frame, and it is supported by essentially every piece of software ever written.

The name stands for Graphics Interchange Format. It was created by CompuServe in 1987 to move images between computers over slow connections, at a time when most screens could not display more than 256 colours anyway. The animation feature was added in 1989 and largely ignored for a decade.

It survived because of one property nothing has replaced: a GIF behaves like an image. It needs no player, no controls and no permission to start. Paste one anywhere an image can go and it moves.

Why are GIFs so large?

Because a GIF stores every frame as a complete separate image, with no compression between frames at all.

This is the single biggest difference between a GIF and a video. When a video encoder sees two nearly identical frames, it stores the difference — a few bytes. A GIF stores the second frame from scratch. A three-second clip at 20 frames per second is sixty complete images in a trench coat.

How badly that hurts depends enormously on the footage. Measured on three clips at identical settings — 480 pixels wide, 15 frames per second, six seconds:

That is a spread of more than a thousand to one from the same settings. It is why no formula can tell you how big a GIF will be, and why any tool claiming to estimate one from width and frame rate alone is guessing.

How do I make a GIF smaller?

Cut the length first, then the width, then the frame rate — in that order, because that is the order of how much each one saves.

What frame rate should a GIF be?

Ten, twenty, twenty-five or fifty — and nothing else, because those are the only rates a GIF can actually store.

This is the detail nobody mentions, and it is worth understanding because it means most GIF converters are quietly lying to you. A GIF stores the gap between frames in hundredths of a second. So the only frame rates that exist exactly are 100 divided by a whole number.

Reading the delay back out of real files produced by a standard encoder:

That 30 fps case is the one that matters. A converter offering "30 fps, very smooth" produces a GIF that plays your video back roughly 11% faster than you filmed it. On anything with recognisable motion — someone walking, someone talking — that is visible.

Twenty frames per second is the sensible default: it is smooth, it is exact, and it is half the frames of 40.

Why do GIFs look worse than the video they came from?

Because a GIF holds 256 colours per frame and a video frame holds up to 16.7 million. That is a limit of the format, not a setting you can turn up.

Gradients are where it shows: a sky, a sunset, a soft studio background, skin tones. Where the original has a smooth transition through thousands of shades, the GIF has to pick 256 and step between them, which produces visible banding.

Good encoders reduce this in two ways. They build a palette from your specific clip rather than using a fixed one — which is worth knowing costs size rather than saving it: measured, a clip-specific palette produced a file 51% larger than the generic one, and looked considerably better. And they dither, deliberately adding a fine pattern of noise so that the eye blends two available colours into the missing one.

Neither fixes it. 256 colours is 256 colours.

GIF vs MP4: which should I use?

An MP4 is smaller and looks better; a GIF works in more places. That is the entire trade.

The size difference is not small, and it swings wildly with content. Measured on the same clip at the same size and frame rate:

Note that the GIF and WebP ranking reverses between those two. GIF compresses flat areas of solid colour extremely well — that is what it was built for — and falls apart on photographic detail. MP4 was smaller in both cases.

Use a GIF when the thing has to behave like an image and start on its own: a README on GitHub, a documentation page, an email, a chat window, a reaction. Use an MP4 or WebP when it is going somewhere that accepts video. Worth knowing: Instagram and TikTok do not accept GIF uploads at all, and X converts them to video on the way in — so most of the "GIFs" you see on social platforms are not GIFs.

How do I make a GIF from a video?

Pick the section you want, choose a width and frame rate, and convert. The only decision that needs thought is how much of the video to include, because length costs more than anything else.

A practical recipe that works for almost everything:

  1. Trim hard. Find the two seconds that matter. Not the ten seconds around them.
  2. 480 pixels wide. Plenty for a chat window, a README or an email.
  3. 20 frames per second. Smooth, and exactly representable.
  4. Crop if it is going somewhere with a shape — square for a feed, vertical for a phone.

Lonecto's video to GIF tool does this in your browser without uploading the video, and because a GIF's size cannot be calculated, it encodes a second of your actual clip to find out how heavy it is and tells you the real number before you commit.

Is it pronounced GIF or JIF?

The format's creator, Steve Wilhite, said "JIF". Most people say "GIF" with a hard G. Both are in every major dictionary and the argument is now older than most of the people having it.

Questions

How long should a GIF be? Under about fifteen seconds, and ideally under five. Past that the file grows quickly and many places that accept GIFs start refusing them.

Can a GIF have sound? No. The format has no audio at all, which is one reason most animated things on social platforms are quietly video files.

How many colours can a GIF have? 256 per frame. The format technically allows a separate palette for each frame, which can hold more overall, but it is fragile in practice and rarely worth the size it costs.

Is GIF lossy or lossless? Its compression is lossless — but reducing an image to 256 colours before compressing it is not, so the result is usually further from the original than a JPEG would be.

Why is my GIF blurry? Usually because it was made wider than the source, which enlarges rather than adds detail. A GIF should never be wider than the video it came from.

What is a WebP, and should I use one instead? WebP is a modern image format that also animates, holds full colour, and is often much smaller — though on flat graphic content a GIF can beat it, as the measurements above show. It plays in every current browser and is a good middle ground when you need an image rather than a video.

Do GIFs work in email? Yes, in most email clients, and it is one of the places GIFs still genuinely earn their place. Some clients show only the first frame, so make sure the first frame makes sense on its own.