The GIF format
GIF is the oldest format on this site by nine years and the one with the least reason to still be here. It holds 256 colours per frame, its transparency is a single bit, and the compression inside it caused the patent fight that produced PNG. What kept it alive is that it moves, plays inside an ordinary image tag and needs no player — and even that case is now better served by a muted video.
GIF at a glance
- Introduced
- 1987 · CompuServe / W3C
- File extensions
- .gif
- MIME type
- image/gif
- Compression
- Lossless
- Transparency
- One bit only — on or off
- Animation
- Yes
- Colour depth
- 8 bits per channel
- Wide gamut
- sRGB only
- High dynamic range
- No
- Maximum dimension
- 65,535 px per side
- Support
- Everywhere, without exception
Lean Image reads GIF and writes it.
Where it came from
CompuServe published GIF in 1987 so that images could be shown across the wildly different computers dialling into its service. The 1989 revision, GIF89a, added transparency, per-frame delays and the ability to hold more than one image; a Netscape extension in 1995 added the loop count, and the animated GIF as everyone knows it was complete almost by accident.
Its compression is LZW, which Unisys held a patent on and began enforcing at the end of 1994. That decision is the direct cause of PNG, which was specified within weeks as a patent-free replacement. The patents expired in the mid-2000s, by which point GIF had lost the still-image argument permanently and won an animation one it was never designed for.
What it can and cannot do
Every frame is drawn from a palette of at most 256 colours, chosen for that image. Encoders dither to disguise the shortfall, trading banding for a visible stipple. Either way, a photograph loses most of its colour on the way in and does not get it back.
Transparency is a single bit. One palette entry is nominated as invisible, and each pixel either uses it or does not. There is no partial alpha, so an antialiased edge has to be forced to fully opaque or fully gone — which is why a GIF logo dropped onto the wrong background carries a fringe of the background it was cut from.
The compression itself is lossless, which is the joke at the centre of the format: GIF reproduces the posterised version of your image perfectly.
For a still image, it is the wrong choice
Not usually, or mostly — in every case. A photograph as a GIF is banded and also larger than the JPEG would have been, because 256 dithered colours compress worse than you would hope. A logo, icon or diagram is smaller as a PNG, has smooth edges instead of jagged ones, and keeps real transparency. There is no category of still image where GIF wins on quality, on size, or on support, since PNG is opened by everything GIF is.
The honest summary is that GIF survives on habit and on the extension being familiar, and every still GIF in circulation would be better as something else.
For animation, reach for video
A muted, looping MP4 or WebM is a fraction of the size of the equivalent GIF — frequently a tenth of it — because a video codec can describe what changed between frames, and GIF largely cannot. Every browser plays them, autoplay works when the video is muted, and the quality is not capped at 256 colours.
This is already the norm, whether or not people notice. The major social and chat platforms transcode uploaded GIFs to video and serve you the video. GIF’s remaining genuine advantage is that it animates inside a plain image tag, which matters in email and in a few systems that will only accept an image. That is the whole of the case.
How this tool writes one
Not with the browser’s canvas, which cannot write a GIF at all. Asking a canvas for image/gif does not fail — the HTML specification tells a browser that cannot encode the type you asked for to fall back to PNG — so you get PNG bytes labelled as a GIF, and no error anywhere. That silent substitution is why the app carries its own GIF encoder, which quantises to a 256-entry palette chosen for your image and snaps alpha to GIF’s single bit deliberately rather than letting a quantiser average partial transparency into a colour.
If your source is an animated GIF, the first frame is converted and the rest are discarded, with a warning saying so.
Convert a GIF into something else
Questions about GIF
Should I ever save a still image as a GIF?
No. There is no still image in 2026 for which GIF is the right answer. A photograph comes out banded and larger than a JPEG; a logo or diagram comes out larger and coarser than a PNG, with worse transparency. If something specifically demands a GIF, convert to one — otherwise do not.
Why does my GIF have a jagged or haloed edge?
Because GIF transparency is one bit: a pixel is either fully opaque or fully absent, with nothing in between. Every antialiased edge has to be snapped to one or the other, and any soft shading that was blended against the old background stays behind as a fringe.
What should I use instead of an animated GIF?
A muted, looping MP4 or WebM. It plays in every browser, looks better, and is a small fraction of the size — often by an order of magnitude. The large platforms already know this and quietly transcode the GIF you upload into video before serving it to anyone.
Does converting an animated GIF here keep the animation?
No. Only the first frame is converted and the rest are dropped, and the app tells you when that has happened rather than letting you find out later. Every format this tool writes except GIF itself is a single still image, so there is nowhere for the other frames to go.
Why does my GIF look banded, and can converting fix it?
The banding is the 256-colour palette, and it is baked into the pixels rather than added on display. Converting to a format with millions of colours gives the image room it no longer needs — the output will look exactly as posterised as the input did.
Work with a GIF file
Drop one in and see what comes out, without uploading anything.