Animated PNG (APNG) Explained: Better Than GIF?
APNG (Animated PNG) is a PNG file with extra frames added. It keeps everything PNG is good at, full 24-bit color and smooth 8-bit transparency, and adds animation on top. It beats GIF on quality, but it's rarely smaller, and outside browsers it's much less widely supported.
How APNG works
APNG was created at Mozilla in 2004 as an extension to PNG. Firefox shipped it early, and the other browsers added it over the following decade. It became part of the official PNG specification with the third edition, published by the W3C in 2025.
The clever part is backward compatibility. An APNG file still uses the .png extension and starts with a normal PNG image. A viewer that doesn't understand the animation chunks simply shows that first image and ignores the rest. Nothing breaks; the animation just doesn't play.
That also means you can't tell an APNG from a regular PNG by its name. If a "PNG" sticker you downloaded animates in the browser but sits still in an image editor, it's an APNG.
APNG vs GIF vs animated WebP
| Feature | GIF | APNG | Animated WebP |
|---|---|---|---|
| Colors | 256 per frame | Full color | Full color |
| Transparency | On/off per pixel | Full alpha (soft edges) | Full alpha (soft edges) |
| Compression | Lossless, LZW | Lossless, Deflate | Lossy or lossless |
| Typical size | Baseline | Similar to much larger | Usually smaller than both |
| Browsers | All | All current browsers | All current browsers |
| Apps and email | Almost everywhere | Limited, often first frame | Mixed |
A few points behind the table:
- Quality. GIF is limited to 256 colors per frame, which causes banding and dithering noise on gradients and photos. APNG has no such limit.
- Edges. GIF transparency is on or off for each pixel, so a logo on a transparent background gets jagged or haloed edges. APNG's alpha channel gives smooth, anti-aliased edges on any background.
- Size. APNG is lossless. For flat graphics with few colors it can be close to a GIF, or even smaller. For anything photographic, keeping every color means a much bigger file. Animated WebP, which can be lossy, is usually the smallest of the three.
For a fuller comparison that includes AVIF and MP4, see WebP vs GIF vs APNG vs MP4.
Where APNG is supported
- Browsers: every current version of Chrome, Edge, Firefox and Safari displays APNG in an
<img>tag. - Stickers: some chat platforms use APNG for animated stickers, because the soft edges look clean over any chat background. Discord's animated stickers are one example.
- Everywhere else: support is thin. Many image editors, email clients, social networks and messaging apps show only the first frame or convert the file to a still PNG on upload.
So APNG works when you control where it's displayed, mainly your own web pages or a platform that asks for it.
When to use APNG
Use APNG when:
- You need soft, partially transparent edges over a background you don't control.
- The animation is short and simple, like a UI icon, a loader or a sticker.
- Color accuracy matters more than file size.
Skip it when:
- The animation is long or photographic. Use video or animated WebP instead.
- You're sending it by email or posting it to social media. Use GIF.
- File size is the main concern. The GIF to WebP converter usually gives a much smaller file with full color and transparency.
Making an APNG from a GIF
Converting a GIF to APNG won't add colors the GIF never had, and it won't soften its hard transparency edges. You only get APNG's real advantages when you build it from full-quality source frames.
If the GIF is all you have, you can still split it into frames with the GIF to PNG tool, which exports every frame as a full-size PNG in a ZIP. You can edit those frames, then assemble them with any APNG-capable tool. The free command-line tool ffmpeg can also convert directly:
ffmpeg -i input.gif -plays 0 output.apng
-plays 0 makes it loop forever. Rename the result to .png if the place you're uploading it expects that extension.