What is a .gif file?
Graphics Interchange Format · Image · CompuServe · 1987
GIF is the classic format for short looping animations and simple graphics. It is limited to 256 colours per frame, which makes it a poor fit for photos, but its universal support keeps it alive for memes and simple animated clips.
What is a .gif file used for?
A GIF can hold many frames plus timing, giving it silent, looping animation that plays in any browser or chat app. That is its lasting appeal.
The 256-colour palette limit means photographs look banded and files get surprisingly large. For animation, modern formats like WebP, AVIF or short MP4 clips are smaller and sharper.
GIF also supports a single fully transparent colour, which is coarser than PNG's smooth alpha.
What opens a .gif file?
The .gif format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.
Windows
- Photos
- any browser
- IrfanView
macOS
- Preview
- Safari
- any browser
Linux
- Image Viewer
- any browser
Web
- Every browser
Open a .gif file step by step
- Confirm the file really is a .gif. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
- On Windows, open it with Photos or any browser.
- On Mac, use Preview or Safari.
- On Linux, try Image Viewer or any browser.
- Still stuck? Convert the .gif to PNG, which opens more widely.
Why can't I open my .gif file?
Almost always because no installed app understands GIF. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.
The other possibility is that the file is not really a .gif at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.
How to convert a .gif file
You can convert a .gif file to PNG, WebP, MP4 using a conversion tool or the export menu of an app that opens it.
Convert images free: ImageConvert
What is the .gif file signature (magic bytes)?
A .gif file starts with the hex bytes 47 49 46 38 39 61, which read as GIF89a in ASCII. Programs identify GIF by those bytes, not by the filename, so a renamed file still gives itself away.
These are the documented signatures for GIF. For a full breakdown, see the GIF file signature page.
| Hex signature | Offset | ASCII | Note |
|---|---|---|---|
| 47 49 46 38 39 61 | 0 | GIF89a | GIF89a |
| 47 49 46 38 37 61 | 0 | GIF87a | GIF87a |
See the full magic-numbers reference for every format.
Frequently asked questions
What is a .gif file?
GIF is the classic format for short looping animations and simple graphics. It is limited to 256 colours per frame, which makes it a poor fit for photos, but its universal support keeps it alive for memes and simple animated clips.
Why does my GIF look grainy?
GIF allows only 256 colours per frame, so photographs and gradients band badly. Convert to WebP or MP4 for smooth colour.
Can a GIF have sound?
No. GIF is silent by design. For animation with audio, use MP4 or WebM.
Comparisons
Related formats
Sources
Details on this page were checked against authoritative references. How sources are ranked and what is deliberately left out is set out in the methodology.