By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

The difference between PNG8, PNG24 and PNG32

The difference between the PNG formats has to do with the color depth, and the type of transparency used.

Edited: 2015-09-04 19:50

The difference between PNG8 and the PNG24 is, as the name of the formats suggests, the PNG8 format only supporting 8 bit colors, while the PNG24 format has 24 bit colors. Finally, the PNG32 format does not actually have 32 bit colors, but rather it is just 24 bit colors, with an extra 8 bit alpha channel.

Even today, PNG8 often remains the first choice for web use, this is both because it allows the smallest file-sizes, and because, quite often, no more than a few colors are needed.

PNG optimization tools can be used to minimize the size images, by adjusting the color palette of the PNGs, often with little or no noticeable difference.

Choosing between PNG8, PNG24 and PNG32

If you only need index transparency, either of PNG8 our PNG24 will be enough. Often you also won't need more than 8 bits of colors, which is important to consider when making files for the web, as minimizing file sizes will drastically lower the time spend transferring them over the internet.

PNG32 includes alpha transparency, and as such, is best for advanced stuff, like creating a transparent gradient or shadow, which allows really cool stuff, like casting shadows on other elements on a page. Be careful though, because files can quickly get quite big.

Saving and optimization

Generally, the software you use to make your graphics in should be able to save – and optimize – your images for web use, but further optimization can often be achieved with free open source PNG compression tools, such as PNGOUT and OptiPNG. These tools can be complicated for beginners to use, so it may be recommended to look for a GUI.

Never pay money for conversion software though, as there are many free open source alternatives, which are often better than software you can buy!

As for editing, Paint.net and Gimp do quite well, even when it comes to minimizing the files for web use.