PNGifier

PNG-8 vs PNG-24 vs PNG-32

PNG comes in a few flavours that differ in how many colours and how much transparency they can store. PNG-8 uses a small palette for the smallest files, PNG-24 stores millions of colours for photos, and PNG-32 adds a full transparency channel on top. Knowing the difference helps you pick the right balance of quality and size.

By Published

What do the numbers in PNG-8, PNG-24, and PNG-32 mean?

The number is the bit depth — how many bits of data each pixel can hold. More bits means more possible colours and, in some cases, room for a transparency channel. PNG-8 spends 8 bits per pixel pointing into a palette, PNG-24 spends 24 bits storing red, green, and blue directly, and PNG-32 adds another 8 bits for an alpha (transparency) channel. The format itself is the same PNG file; the depth just controls what it can represent. If you are new to the format, start with what is a PNG.

How do PNG-8, PNG-24, and PNG-32 compare at a glance?

PNG-8PNG-24PNG-32
ColoursUp to 256 (palette)~16.7 million~16.7 million
TransparencySimple / limitedNone by defaultFull alpha (smooth)
Typical sizeSmallestLargeLargest
Best forIcons, flat logos, simple graphicsPhotos, gradientsPhotos / logos with transparency

What is PNG-8 best for?

PNG-8 is 8-bit indexed colour. Instead of storing a full colour for every pixel, it builds a palette of up to 256 colours and each pixel simply points to an entry. That makes PNG-8 the smallest of the three and ideal for flat graphics, icons, and simple logos where only a handful of colours appear. Its transparency is limited — a pixel is either on or off — so soft edges can look jagged. Reducing a PNG-24 or PNG-32 to a PNG-8 palette, a process called palette quantization, is exactly how a PNG optimiser shrinks files.

When should you use PNG-24?

PNG-24 is 24-bit truecolor, storing red, green, and blue values directly for roughly 16.7 million possible colours. That range handles photographs and smooth gradients without the banding you would see in a 256-colour palette. The trade-off is size: storing every pixel in full colour makes PNG-24 files much larger than PNG-8. By default PNG-24 has no transparency — if you need a transparent background, you are really reaching for PNG-32.

What does PNG-32 add over PNG-24?

PNG-32 is PNG-24 plus an 8-bit alpha channel — 32 bits per pixel in total. That alpha channel records how transparent each pixel is, from fully opaque to fully invisible and every step in between, which gives clean, smooth edges over any background. It is the format you want for truecolor images that also need transparency, such as product shots or detailed logos. To go deeper on the alpha channel, see PNG transparency.

Which PNG type should you use?

Match the format to the image. Choose PNG-8 for flat graphics, icons, and simple logos where small file size matters most. Choose PNG-24 for photos and gradients that need full colour but no transparency. Choose PNG-32 when you need both truecolor and smooth transparency. If your file is larger than it needs to be, you can often compress the PNG by letting the optimiser quantize it down to a PNG-8 palette.

Frequently asked questions

Is PNG-8 or PNG-24 smaller?
PNG-8 is almost always smaller because it stores at most 256 colours from a palette, while PNG-24 stores millions of full-colour pixels. That is exactly why optimisers reduce a PNG-24 to a PNG-8 palette to shrink files.
Does PNG-8 support transparency?
Yes, but only simple transparency — a pixel is either fully visible or fully transparent. For smooth, semi-transparent edges you need PNG-32, which adds a full alpha channel.
What is the difference between PNG-24 and PNG-32?
PNG-24 is 24-bit truecolor with no transparency by default. PNG-32 is the same 24 bits of colour plus an 8-bit alpha channel — 32 bits total — giving full, smooth transparency.
Which PNG type should I use for a logo?
For a flat logo with a few solid colours, PNG-8 gives the smallest file. If the logo has gradients, soft shadows, or anti-aliased edges over a transparent background, use PNG-32.