What is PNG?
Portable Network Graphics, created by PNG Development Group (W3C Recommendation) in 1996.
PNG exists because of a patent dispute. In 1994 Unisys began enforcing its patent on the LZW compression algorithm that GIF depends on, and the web needed a replacement that nobody owned. A group formed on a mailing list, and within about a year produced a format that was not only unencumbered but substantially better than the thing it replaced.
The design decisions have aged remarkably well. PNG uses DEFLATE — the same algorithm as ZIP — combined with a per-row prediction filter that makes the data more compressible before it is deflated. Because the compression is lossless, an image saved and resaved a hundred times is bit-for-bit identical to the original. That property is the whole point.
The other headline feature was an 8-bit alpha channel, at a time when GIF offered a single fully transparent palette index. PNG's per-pixel transparency is what made soft-edged graphics on arbitrary backgrounds possible, and it remains the reason designers reach for it.
What PNG was never designed to do is store photographs. It has no perceptual model — it cannot decide that a subtle gradient in a sky is not worth encoding precisely, because it is not allowed to decide anything of the sort.
Technical specification
| Property | PNG |
|---|---|
| Compression | Lossless (DEFLATE with per-row prediction filters) |
| Bit depth | 1, 2, 4, 8 or 16 bits per channel |
| Transparency | Yes — full 8-bit or 16-bit per-pixel alpha |
| Animation | Not in the base format; APNG is a separate extension |
| HDR | No standard HDR support; 16-bit depth is available but not HDR-aware |
| Maximum dimensions | 2,147,483,647 × 2,147,483,647 px (practically unbounded) |
| Colour spaces | sRGB, plus embedded ICC profiles and gamma chunks |
| Metadata | tEXt/iTXt text chunks, XMP; EXIF only since PNG 1.5 and poorly supported |
PNG support in browsers and operating systems
Checked on 2026-08-10. We re-verify this table every quarter.
| Platform | Support |
|---|---|
| Chrome | all versions |
| Safari | all versions |
| Firefox | all versions |
| Edge | all versions |
| iOS | all versions |
| Android | all versions |
| Windows | all versions since 98 |
| macOS | all versions |
PNG compared with nearby formats
Against JPEG. These two solve opposite problems and comparing them by file size alone is misleading. On a photograph JPEG will be five to ten times smaller and look identical; on a screenshot of text PNG will be smaller *and* sharp, while JPEG smears coloured fringes around every letter. Pick by content, not by habit.
Against WebP. WebP has a lossless mode that beats PNG by roughly 25% on the same images, with the same alpha support. For web delivery it is simply better. PNG's advantage is that it opens in everything, including software from 1999.
Against SVG. For logos and icons, SVG is usually the right answer instead — it is a vector description, so it stays sharp at any size and is often a fraction of the bytes. PNG is what you use when the artwork is not vector, or when the destination cannot render SVG.
When to use PNG, and when not to
Use PNG for screenshots, user-interface graphics, diagrams, charts, logos, and any image with large areas of flat colour or sharp edges. Use it whenever transparency is required and the destination is not a modern browser. Use it as an intermediate format when an image will be edited and resaved repeatedly, because lossless means the tenth save is identical to the first.
Do not use PNG for photographs. A 12-megapixel photo saved as PNG can be 30 MB where a visually identical JPEG is 3 MB, and nothing is gained — the extra bytes encode sensor noise with perfect fidelity.
Do not use PNG for animation. APNG exists and browsers support it, but tooling is patchy and WebP or an actual video file will be smaller and easier.
Frequently asked questions
Why is my PNG so much larger than the JPEG version?
Because PNG never discards anything. JPEG analyses the image and throws away detail the eye is unlikely to notice — on a photograph that is most of the file. PNG encodes every pixel exactly, including sensor noise, which compresses badly. For photographs that trade is almost never worth it.
Does PNG lose quality when I save it repeatedly?
No. Compression is lossless, so opening a PNG and saving it again produces pixel-identical output no matter how many times you repeat it. This is why PNG is a good working format for images that go through several editing rounds.
What is the difference between PNG-8 and PNG-24?
PNG-8 uses a palette of at most 256 colours, PNG-24 stores full 24-bit colour. PNG-8 files are much smaller and are fine for flat graphics with few colours; they handle transparency less gracefully, since a palette entry is either transparent or it is not. PNG-32 is PNG-24 plus a full alpha channel.
Can PNG store EXIF data from my camera?
Officially since PNG 1.5, but support across software is inconsistent enough that you should not rely on it. If camera metadata matters, keep the original JPEG or HEIC. Converting a photo to PNG will usually strip the shooting information.