Skip to main content

What a GIF file is

What a .GIF file is, what it does well, what opens one, and how to convert it — with every conversion running in your own browser.

What a GIF file is

A GIF is an image limited to 256 colours, which can hold more than one frame and play them in a loop. Both halves of that sentence explain everything about how the format is used: the colour limit makes it poor at photographs, and the animation makes it the format of the short looping clip.

The 256-colour palette is not a setting but the format itself. A photograph converted to GIF has to have its millions of colours reduced to a few hundred, which is why the sky comes out in visible bands and why faces look blotchy.

Its transparency is equally blunt: a pixel is either fully transparent or fully opaque, with nothing in between. A logo with a soft edge saved as GIF gets a hard, jagged one.

Where it came from

CompuServe introduced GIF in 1987, for downloading images over modems at a time when a colour photograph was an unreasonable thing to send. It should have been superseded years ago and was not, because animation kept it alive: for two decades it was the only way to put a moving image in a web page without a plugin.

GIF at a glance

The technical properties of the GIF format.
PropertyGIF
CompressionLossless
ColourA palette of 256 colours
TransparencyOne colour, on or off
AnimationYes
Keeps EXIFNo
Browser supportEvery browser since 1993
Size of a photographNot a format for photographs
Published1987

GIF at a glance

  • Compression is lossless, so converting between it and another lossless format is a repackaging rather than a re-encoding: nothing is decided and nothing is lost.
  • Colour is limited to a palette of at most 256, chosen per file. Anything with more than that has to be approximated, which is what produces visible banding.
  • Transparency exists but is all or nothing per pixel, so a soft edge becomes a hard one and needs to be drawn against the intended background instead.
  • The container holds more than one frame, so converting to a still format keeps the first and discards the rest.
  • There is no standard place for camera data, dates, or copyright, so anything the source carried is dropped on the way in.

What it is good at

  • Transparency, of a simple kind: a pixel is either fully see-through or fully solid, with nothing in between.
  • Holds several frames and plays them, so it can carry a short looping clip.
  • Nothing is discarded. What you put in is what comes back, however many times you save it.
  • Every browser in use reads it, and has for long enough that it needs no fallback.

Where it falls short

  • At most 256 colours, so photographs come out banded and blotchy.
  • No standard place for camera data, dates, or copyright, so those are lost on the way in.

What to use instead of GIF

  • For photographs, use JPG for compatibility, WebP for a good balance, or AVIF for the smallest file. This format is not built to store one and will be both larger and worse.
  • For anything with gradients or more than a few hundred colours, use PNG for graphics and JPG, WebP, or AVIF for photographs.

When to use GIF

Choose GIF only when something in the chain accepts nothing else. That is a real situation — some email templates, some forums, some older chat clients — and it is the one case where GIF is the right answer rather than the familiar one.

Avoid GIF for everything else, and particularly for photographs, where the 256-colour limit is disfiguring. For animation, animated WebP does the same job at a fraction of the size with full colour and real transparency; for still graphics, PNG is smaller and better.

What opens a GIF file

On a computer, GIF files open in Preview on macOS, Photos on Windows, GIMP.

Every browser in use displays them, so opening one is usually a matter of dragging it into a browser window.

Turn a GIF file into something else:

Produce a GIF file from something else:

Common problems with GIF

The edges of my logo look hard and jagged.
Transparency here is all or nothing per pixel, so the soft partly-transparent edge the original had could not be represented. Convert to PNG or WebP, both of which carry a full alpha channel, or redraw the image against the background it will actually appear on.
Smooth gradients came out in visible stripes.
The palette is limited to a few hundred colours, and a gradient needs thousands, so the encoder had to approximate. Nothing tuned inside this format will fix it. A photograph or a gradient belongs in a format that stores millions of colours.
Only the first frame came out.
The format you converted to holds one image, so there was nowhere for the remaining frames to go. Convert to animated WebP if the movement matters. It stores the same animation in a fraction of the size, with full colour and proper transparency.
The camera data and copyright fields have disappeared.
The format has no standard place to keep them, so anything the source carried was dropped on the way in. Convert to a format that holds metadata if attribution matters, or keep the original alongside the converted copy as the record of where it came from.

Converting a GIF file here

  1. Choose your file, or drag it onto the box. It is read from your device and goes no further.
  2. Set whatever the conversion offers — quality, size, background — and start it. Everything runs on your own machine, so a large image uses your memory and your processor rather than a queue somewhere.
  3. Download the result. Nothing is kept: leaving the page or resetting it releases the file and the converted copy alike.

GIF against the alternatives

Common questions

Why does my photograph look terrible as a GIF?
Because GIF stores at most 256 colours and a photograph contains millions. The encoder has to pick a few hundred and approximate everything else, which produces banding in gradients and blotches on skin. Photographs belong in JPG, WebP, or AVIF; GIF is for flat graphics and short animations.
What should I use instead of GIF for animation?
Animated WebP, which stores the same thing in a fraction of the size with full colour and proper transparency, and which every current browser reads. GIF remains useful only where something in the chain — an old chat client, a forum, an email template — accepts nothing else.
Why is my GIF so large for such a short clip?
Because it stores every frame nearly in full rather than describing what changed between them, the way a video codec does. A three-second clip can easily run to several megabytes. Animated WebP stores the same thing in a small fraction of the space.
Is transparency kept when I convert a GIF file?
Only if the format you convert to has somewhere to put it. PNG, WebP, AVIF, and GIF all do, to varying degrees; JPG and BMP do not, and a transparent area becomes a solid colour when you convert to one. The tool tells you which background it used.
Do all the frames survive a conversion?
Only when the target format animates too. Converting to a still format keeps the first frame and drops the rest, which is usually not what somebody wants and is easy to do by accident. Animated WebP is the format to convert to if the movement matters.
How do I open a .GIF file?
The software listed above reads them directly. If nothing on your machine will, converting to PNG or JPG is the reliable route — both open in everything, and the conversion happens here in your browser rather than on a server.
Does converting a GIF file lose quality?
It depends on what you convert it to rather than on what you convert from. Converting to a lossless format such as PNG preserves every pixel; converting to JPG, WebP, or AVIF discards detail permanently. Nothing recovers quality the file had already lost.
Is converting from GIF free, and does it upload my file?
Free, with no account, and nothing is uploaded. Every converter on this site reads your file with the browser's own file APIs, converts it using code running on your device, and hands the result back as a download. You can confirm that yourself in the Network panel of your browser's developer tools.
Where does the conversion happen?
In your browser, on your own device. There is no conversion server here to upload anything to, and no third-party service is involved. That is a statement about what the site does rather than a promise about how it handles uploads, because no upload takes place.

Ads on this site

Advertising pays for this site. The ads may store cookies to choose what to show you and to avoid repeating themselves. Your files are not involved in any of it — they never leave your browser, whichever button you press, and every tool works either way.

What this covers