Cookies for analytics and advertising
We use cookies for analytics and advertising, both sent to Google. Refusing changes nothing you can see.Read the privacy page
PNG for still images, GIF only when it has to move.
Choose PNG when
Every still image, without exception. PNG has millions of colours to GIF’s 256, smooth transparency instead of a single hard-edged transparent colour, and smaller files.
Choose GIF when
Short looping animation where the audience or the platform will not take a video. That is the only thing GIF still does that PNG does not.
GIF’s 256-colour limit is what makes a photograph look banded and speckled in one. That is not a compression setting; it is the format.
GIF has no alpha channel. A transparent PNG comes out with those areas filled in — white unless something else is set — and no setting in GIF brings the transparency back.
GIF stores at most 256 colours per frame. A photograph converted into one is reduced to a palette, which is what makes the sky look stepped rather than smooth — it is the format, not a quality setting.
PNG carries up to 16 bits per channel and GIF stores 8. The extra precision is what survives heavy correction without banding, so the conversion is best made after the editing rather than before it.
Nothing is discarded. PNG and GIF both store their content losslessly, so the conversion is a change of packaging rather than a change of quality, and it can be repeated without accumulating damage.
Adobe Photoshop and GIMP read both PNG and GIF, so there is a way to check the result against the original without a second tool.
PNG is PNG Development Group's format, published in 1996. It records 16 bits per channel.
GIF comes from CompuServe and dates from 1987, specified as GIF89a. GIMP, Adobe Photoshop and ImageMagick all read it.
PNG holds a single still image. An animated GIF keeps its first frame and loses the rest, so a conversion is a way to take a still out of one, not a way to move it.
Nothing is discarded. GIF and PNG both store their content losslessly, so the conversion is a change of packaging rather than a change of quality, and it can be repeated without accumulating damage.
Transparency survives. Both GIF and PNG store an alpha channel, so a cut-out stays cut out and nothing is filled in behind it.
GIF dates from 1987 and is largely superseded. PNG is what current software writes, so the conversion is as much about staying readable as about the file itself.
GIMP and Adobe Photoshop read both GIF and PNG, so there is a way to check the result against the original without a second tool.
GIF is CompuServe's format, published in 1987. It records 8 bits per channel.
PNG comes from PNG Development Group and dates from 1996, specified as ISO/IEC 15948. Adobe Photoshop, GIMP and Paint.NET all read it.






| PNG | GIF | |
|---|---|---|
| Full name | Portable Network Graphics | Graphics Interchange Format |
| Extension | .png | .gif |
| Media type | image/png | image/gif |
| Compression | Lossless — nothing is discarded | Lossless — nothing is discarded |
| This site can write it | Yes | Yes |
Which to choose
In 1994 the patent holder on GIF’s compression began asking for licence fees from software that wrote the format. Within months a group of developers had specified a replacement, and PNG was published in 1996: better compression, millions of colours instead of 256, real transparency, and free of any patent.
It succeeded almost completely. Everything GIF was used for in 1995 — logos, buttons, diagrams, interface graphics — became PNG, and the only thing left behind was the one feature PNG deliberately omitted.
Animation. A GIF holds a sequence of frames with timing, plays automatically, loops forever and needs no player, no controls and no permission — which is why it survived a format war it otherwise lost comprehensively.
PNG holds one frame. APNG, the animated extension, exists and is supported by every current browser, and it is still not what anybody means by "a gif". The word has stopped being a format and become a genre: short, silent, looping, posted. Platforms that accept "GIFs" now overwhelmingly convert them to video behind the scenes and keep the name.
A GIF picks a palette of at most 256 colours for the whole image, and every pixel must be one of them. For a logo with four flat colours that is plenty. For a photograph it is nowhere near enough — the sky bands into visible stripes, skin tones go blotchy, and gradients break into steps.
PNG carries millions of colours and does not choose. That difference is why a photograph should never be a GIF, and why old web pages full of GIF photographs look the way they do. The reduction is also permanent: converting that GIF to PNG preserves what is there and cannot restore the colours discarded when the palette was chosen.
GIF transparency is one bit. A pixel is either completely see-through or completely opaque, with nothing in between, which is why cut-out GIFs have stair-stepped edges and a faint fringe of whatever colour they were designed against.
PNG has a full alpha channel with 256 levels, so an edge can fade properly and a logo can sit on any background. On a page with a coloured or patterned background, this is immediately visible, and it is the reason interface graphics moved to PNG the moment browsers supported it.
For a still image with few colours, GIF is occasionally smaller — a two-colour icon of a few hundred bytes is about as compact as it can be in either format. Beyond that, PNG wins: its compression is better, and it is not paying for a palette table.
For animation the comparison is brutal. GIF stores frames with only crude sharing between them, so a three-second clip routinely runs to several megabytes where the same clip as MP4 is a couple of hundred kilobytes and looks better. Any moving image that is genuinely video should be video; GIF’s file size is the reason platforms quietly convert it.
If it is still: convert it to PNG. Smaller, no palette limit, proper transparency, and nothing is lost because the GIF had already discarded everything it was going to.
If it moves and needs to keep moving: convert it to MP4 or WebM. Every frame survives, it plays everywhere, and it is a fraction of the size. If it moves and the motion does not matter — a diagram that happens to have been saved as an animation — take the first frame as a PNG.
The only reason to keep a GIF as a GIF is a destination that will accept nothing else, which in 2026 is a short list: a few forum and email contexts, and some older signage or embedded displays.
A still graphic on a website should be WebP, with PNG as the fallback. WebP does everything PNG does at a quarter to a half fewer bytes, and it also handles animation, which makes the whole comparison on this page a historical one on the modern web.
A moving image should be a video — MP4 for compatibility, WebM where the site controls the player. The only situation that genuinely calls for a GIF today is one where somebody else’s system asks for it by name.
On every axis except animation: more colours, better compression, and proper transparency instead of GIF’s hard one-bit edges. PNG was created in 1996 specifically to replace GIF, and it did — apart from the moving image.
APNG exists and every current browser supports it, but it never displaced GIF culturally and platforms do not expect it. For a moving image the practical answer today is video — MP4 or WebM — which is smaller and looks better than either.
GIF allows at most 256 colours in the whole image, so a photograph’s gradients break into visible steps. The reduction happens when the file is made and is permanent — converting to PNG keeps what is left but cannot bring the colours back.
GIF transparency is one bit: a pixel is fully transparent or fully opaque, with nothing in between. PNG has 256 levels of transparency, so edges can fade smoothly and a graphic can sit on any background colour.
Still ones, yes — smaller file, no palette limit, better transparency, and nothing is lost. Animated ones should become MP4 or WebM instead, where every frame survives at a fraction of the size.
GIF stores each frame with only crude sharing between them, where video codecs describe what changed. A three-second clip that is several megabytes as a GIF is typically a couple of hundred kilobytes as an MP4, and looks better.
The claims this page makes about PNG and GIF are checkable, and these are the documents that settle them.