Formats explained
PNG-8 vs PNG-24 vs PNG-32: which one actually saves you space
Every PNG is one of three things: an indexed-color image with a fixed palette, full color without transparency, or full color with transparency. Most guides explain this with jargon. This one explains it with the only question that matters — which one should your file be, and how much smaller does the right choice actually make it? Measured, not asserted.
At a glance
- "PNG-8", "PNG-24" and "PNG-32" are designer shorthand, not spec terms — the PNG specification defines color types, and none of these names appear in it.
- Measured on our corpus: PNG-8 shrank a 4-color logo by 11% versus PNG-24 and a flat-art graphic by 15% — useful, not magical.
- The trap in the other direction: on our gradient test image, PNG-8 came out 40% larger than PNG-24. Palette reduction is not always a win.
- A photograph forced into PNG-8 at 256 colors was still 3.6 times the size of a JPEG at quality 85 — that is a format-choice failure, not a PNG failure.
First, the terminology problem
"PNG-8", "PNG-24" and "PNG-32" are designer shorthand. The PNG specification — published as ISO/IEC 15948 and identical to the W3C recommendation — defines color types, and the shorthand maps onto them roughly like this:
| Shorthand | PNG color type | Colors | Alpha (transparency) |
|---|---|---|---|
| PNG-8 | Type 3 — indexed color | Up to 256, from a palette | Yes — palette entries can carry alpha |
| PNG-24 | Type 2 — truecolor RGB | 16.7 million (8 bits × 3 channels) | No |
| PNG-32 | Type 6 — truecolor + alpha (RGBA) | 16.7 million | Yes, full 8-bit alpha |
Two things people get wrong immediately:
- "PNG-32" is not an official term. The specification (and every serious tool) calls it truecolor with alpha, color type 6. The "32" just counts bits: 8 red + 8 green + 8 blue + 8 alpha. You will not find "PNG-32" anywhere in the specification — the term comes from how export dialogs in 2000s design software labeled their options.
- PNG-8 can have transparency too. The old rule of thumb "need transparency → use PNG-24/32" is outdated. Indexed PNGs support per-palette-entry alpha, so a PNG-8 logo with soft edges is perfectly possible.
The three modes side by side
| PNG-8 (indexed) | PNG-24 (truecolor) | PNG-32 (truecolor + alpha) | |
|---|---|---|---|
| Max colors | 256 | 16,777,216 | 16,777,216 |
| Transparency | 1-bit or 8-bit alpha via palette | None | Full 8-bit alpha |
| Best for | Logos, icons, flat UI graphics, simple charts | Photos exported as lossless, screenshots with gradients | Product shots, overlays, anything cut out of its background |
| Typical size | Smallest | Medium | Largest per pixel |
| Lossless? | Encoded PNG data is lossless, but reducing truecolor pixels to a palette can discard colors. | Yes | Yes |
| Watch out for | Banding on gradients, visible dithering on photos | Transparency is discarded | Nobody needs 32 bits on a flat two-color icon |
The intuition: PNG-8 stores one palette index per pixel (a single byte or less), while PNG-24/32 store three or four bytes per pixel. For graphics with few distinct colors, storing "color #37" instead of three full channel values wins every time — if the palette itself stays small and the index stream stays regular. The measurement below shows where that logic holds and where it breaks.
How much smaller is PNG-8, actually? Measured.
We took the six images from our published test corpus and exported each one in every mode with the same encoder and settings (Pillow 12.3.0, zlib optimize on, 7 November 2026). PNG-24 rows are the RGB export, PNG-32 rows the RGBA export; PNG-8 rows quantize to adaptive palettes of 256 and 128 colors. The distinct-color counts come from the source files themselves.
| Test image | Distinct colors | PNG-24 | PNG-32 | PNG-8 (256) | PNG-8 (128) |
|---|---|---|---|---|---|
| Logo | 4 | 5.4 KB | 6.0 KB | 4.8 KB (−11%) | 4.3 KB (−20%) |
| Flat artwork | 7 | 14.4 KB | 16.5 KB | 12.2 KB (−15%) | 11.7 KB (−19%) |
| Gradient | 1,226 | 6.3 KB | 7.7 KB | 8.8 KB (+40%) | 8.3 KB (+32%) |
| UI screenshot | ~433,000 | 1,081.2 KB | 1,234.5 KB | 318.9 KB (−70%) | 247.9 KB (−77%) |
| Product cutout | ~648,000 | 1,499.0 KB | 1,703.6 KB | 96.7 KB (−94%) | 90.4 KB (−94%) |
| Photograph | ~1,087,000 | 3,167.5 KB | 3,761.9 KB | 659.7 KB (−79%) | 560.7 KB (−82%) |
Three rows deserve a second look, because they contradict the folk wisdom:
- The logo and flat-art rows win less than expected. With only a handful of colors, PNG-8's savings are real but modest — 11 to 20%. The palette table itself costs bytes, and modern PNG filters already compress flat areas well in truecolor mode. PNG-8 is the right answer here, but it is not a tenfold win.
- The gradient row goes the wrong way. At 1,226 distinct colors the image does not fit a 256-entry palette, so quantization adds dithering noise — and noise is exactly what PNG's filters cannot compress. PNG-8 came out 40% larger than PNG-24, while also looking worse. When an image has too many colors for the palette, indexed color loses twice.
- The photo row wins on bytes and loses on everything else. Crushing ~1.1 million colors to 256 cut the file 79% — but the result is visibly dithered and banded. And for perspective: the same photograph encoded directly as JPEG at quality 85 weighs 183.5 KB from the same measurement run, 3.6 times smaller than the PNG-8. (Our published benchmark's 140.3 KB JPEG figure is not comparable — it re-encodes a WebP that has already smoothed the detail.) A photo saved as PNG-8 is a format-choice failure, not a PNG failure.
Source: measured on 7 November 2026 with Pillow 12.3.0 on the published corpus; raw per-format CSV at ./assets/bench/study-a-format.csv, the JPEG q85 figure from the same run.
When to use which
Choose PNG-8 when
- The image has fewer than ~256 distinct colors: logos, icons, flat illustrations, pixel art, simple diagrams.
- You need transparency and the edges are hard (an icon on a button), or you can accept palette-based soft edges.
- You are delivering graphics to environments that reject WebP — see our WebP compatibility guide — and still want the smallest safe file.
Choose PNG-24 when
- The image is photographic or has gradients, and you cannot use lossy formats (JPEG/WebP) because the pipeline demands PNG.
- Transparency does not matter. If it does not matter, do not pay for the alpha channel.
Choose PNG-32 when
- You need truecolor and full anti-aliased transparency: cut-out product photos, layered UI mockups, overlays.
- Note the trap: an all-opaque image saved as PNG-32 carries an alpha channel that compresses well but still adds bytes — in our corpus run, 15 to 18% on the truecolor rows. If nothing in the file is transparent, export as PNG-24.
What this means when you export
Our converter works on the truecolor side of the family — it reads any PNG and exports JPG or WebP, and the white background tool flattens a transparent PNG-32 onto a solid colour, which produces exactly the PNG-24 case: truecolor, no alpha, smaller file, with the background baked in where the transparency used to be. What our tools deliberately do not offer yet is PNG-8 palette reduction: a good quantizer needs careful dithering choices, and a browser canvas export cannot provide the preview-and-tune loop that deciding "will 64 colors still look right?" requires. For palette export, use an editor that shows the palette and a live preview, and judge the result at 100% zoom — the measured table above tells you whether the fight is worth having: near or under 256 distinct colors, try PNG-8; well above, stay truecolor or switch to a lossy format.
Common misconceptions
- "PNG-32 is a different, newer PNG format." It is not. It is ordinary truecolor RGBA PNG (color type 6), present in the spec since 1996. The name is export-dialog folklore.
- "PNG-8 always looks bad." True only for photographic content. For flat graphics it is visually identical at a fraction of the size.
- "PNG-8 can't have smooth transparency." Palette PNGs support 8-bit alpha per palette entry. With ≤256 shades needed on the edges, soft transparency works fine for most logos.
- "Converting PNG-24 to PNG-8 is always safe." Always preview. Gradient-heavy images band; photos dither. The conversion adds no compression artefacts, but the palette reduction itself is a lossy step — and as the gradient row shows, it can even make the file bigger.
FAQ
Is PNG-32 an official format?
No. It is a colloquial name for PNG color type 6 (truecolor RGB plus 8-bit alpha). The PNG specification itself never uses the term; the label comes from export dialogs in 2000s design software.
Does PNG-8 support transparency?
Yes. Indexed PNGs can assign an alpha value, including full 8-bit alpha, to each palette entry. Hard-edged transparency always works; soft edges work as long as the anti-aliased edge shades fit within the palette.
Why is my PNG-8 bigger than my JPEG?
Different jobs. JPEG is a lossy photographic codec; PNG-8 is a lossless indexed format. For photographs, JPEG wins on size at equal visual quality — on our corpus, a 256-color PNG-8 of the test photograph was 3.6 times the size of a JPEG encoded from the same source at quality 85.
Can I convert back from PNG-8 to PNG-24 and recover the lost colors?
No. Palette reduction discards the original channel data. Converting upward only inflates the file; the colors are gone. Keep the original.
What palette size should I pick?
Start at 256, check the preview, then walk down (128, 64, 32) while the preview still looks clean. Flat logos often survive at 8 to 16 colors, which shrinks them further.
Do PNG-24 and PNG-32 look identical when there is no transparency?
Yes — pixel-identical. The 32-bit version just carries a redundant alpha channel. Export opaque images as PNG-24.
Sources
- ISO/IEC 15948 (PNG specification, technically identical to the W3C PNG recommendation) — color types, indexed color, palette alpha.
- Size measurements: 7 November 2026, Pillow 12.3.0, published corpus at ./assets/bench/ (raw CSV included).
Need the truecolor side of the family?
Convert PNG to JPG or WebP, or flatten transparency onto a solid background — locally, with measured results.