Why PNG exists
PNG was born out of a licensing fight. In the mid-1990s the GIF format's LZW compression was covered by a Unisys patent, and developers wanted a free alternative. The result, finalised in 1996, did more than dodge the patent: it added true-colour support, far better lossless compression, and a proper alpha channel for smooth transparency.
That alpha channel is PNG's defining feature. Where GIF transparency is a single on/off bit per pixel — giving jagged edges — PNG stores 256 levels of transparency (and up to 65,536 in 16-bit files), so a logo can sit cleanly on any background.
Lossless, and what that costs
PNG never throws pixels away. Save and re-save it a hundred times and it stays identical, which is exactly what you want for an image you'll keep editing. The trade-off is size: a photograph saved as PNG can be many times larger than the same photo as JPEG, because lossless compression simply can't shrink continuous-tone images as aggressively.
The rule of thumb that follows: PNG for graphics, JPEG (or WebP) for photos. Screenshots are the grey area — a screenshot of text stays crisp and reasonably small as PNG, but a screenshot of a photo is often better as JPEG.
Strengths
- Lossless — perfect for repeated editing and crisp edges.
- Full alpha transparency with smooth edges.
- Open standard, supported by every browser and editor.
Limitations
- Large files for photographs compared with JPEG or WebP.
- No animation (that's APNG, which is less widely supported).
When to use PNG
Use PNG for screenshots, logos, icons, line art and anything needing sharp edges or transparency. For photographs, prefer JPEG or WebP.
PNG FAQ
- Is PNG better than JPEG?
- For graphics, text and transparency, yes — PNG is lossless and keeps edges crisp. For photographs, JPEG is usually the better choice because it produces far smaller files with no visible loss.
- Does PNG support transparency?
- Yes. PNG has a full alpha channel with smooth, graduated transparency — 256 levels in an 8-bit image and far more in 16-bit — so images can have clean see-through edges on any background.
- Why is my PNG so large?
- PNG is lossless, so photographs — which have millions of subtly different pixels — don't compress well. Convert the photo to JPEG or WebP for a dramatically smaller file.