I was wondering what is the difference between PNG and PNG8?

Is there any difference between PNG and PNG8 in image quality? Why would I want to use PNG8 over PNG and vice versa? Lets say I draw an image in Photoshop. Does PNG mean that I will get the same pixels that I drew in Photoshop 1 to 1?


5 Answers 5


The PNG specification only defines "png", which can come in a variety of different bit depths and color types (RGB, RBGA, Gray, Gray-alpha, indexed). The "PNG8" nomenclature is simply a convenient way of referring to an indexed (8-bit pixels) image. ImageMagick, for example, uses PNG8, PNG24, PNG32, PNG48, and PNG64, to identify 8-bit indexed with binary transparency, 24-bit RGB, 32-bit RGBA, etc. I'm not sure whether PhotoShop's definition limits PNG-8 to binary transparency or not. A PNG8 is limited to 256 palette entries, while a PNG24 can have 16 million different colors.

Chances are that this is a duplicate question, but it's easier to just answer than to search for dupes. I'll do that now...

OK there are 29 questions about PNG8 in this site, and 542,000 questions throughout StackExchange, probably mostly dupes of this one.


Perhaps you meant PNG-8 and PNG-24?

There are two PNG formats: PNG-8 and PNG-24. The numbers are shorthand for saying "8-bit PNG" or "24-bit PNG." Not to get too much into technicalities — because as a web designer, you probably don’t care — 8-bit PNGs mean that the image is 8 bits per pixel, while 24-bit PNGs mean 24 bits per pixel.

To sum up the difference in plain English: Let’s just say PNG-24 can handle a lot more color and is good for complex images with lots of color such as photographs (just like JPEG), while PNG-8 is more optimized for things with simple colors, such as logos and user interface elements like icons and buttons.

When you need to preserve transparency and large amounts of color, as well as achieve full or partial transparency, the PNG image format is the best.

Since it’s a lossless format, images saved using the PNG format aren’t going to be small all the time, but because PNG stores a lot of additional data, you can easily optimize images for web usage to reduce file sizes.

  • whenever I save a photoshop image to png file then is it png-8 or png-24?
    – LiziPizi
    Commented Sep 4, 2016 at 15:57
  • @LiziPizi: you get to choose that.
    – Jongware
    Commented Sep 4, 2016 at 16:44
  • 1
    LiziPizi. If you do not understand the diference use Png 24 (Or plain Png)
    – Rafael
    Commented Sep 4, 2016 at 17:32
  • @rafael Sorry for questioning again but you just said "plain png". what does it mean?
    – LiziPizi
    Commented Sep 5, 2016 at 15:48
  • 1
    You called it just PNG. A normal PNG is 24 bits. If a program just say PNG it refers to this 24 bit PNG or PNG-24.
    – Rafael
    Commented Sep 5, 2016 at 15:55

PNG24 supports millions of colors. PNG8 only supports up to 256 colors.

That's why PNG8 files are so much smaller. If your images look OK in PNG8, use it. If the colors look grainy, use PNG24.

  • Just worth pointing out (and I think this is the OP's confusion) that when an application says "PNG" it almost always means "PNG, 24-bit". Many programs will give you a choice between 8- and 24-bit. Commented Sep 6, 2016 at 15:51

You should be aware of a few key factors...

There are also different colour depths (palettes): Indexed color and Direct color.

  • Indexed means that the image can only store a limited number of colours (usually 256), controlled by the author, in something called a Color Map
  • Direct means that you can store many thousands of colours that have not been directly chosen by the author

PNG-8 - Lossless / Indexed

PNG-8 can only store 256 colours, like GIFs, it is really a good replacement for GIFs because (although animation isn't as supported), it adds Alpha Transparency (see below for a comparison).

PNG-8 vs GIF

PNG-24 - Lossless / Direct

PNG-24 is a great format that combines Lossless encoding with Direct color (ie. thousands of colours, just like JPEG). Unfortunately PNG-24 files will still be bigger than JPEGs (for photos), and GIFs/PNG-8s (for logos and graphics), so you still need to consider if you really want to use one.

Even though PNG-24s allow thousands of colours while having compression, they are not intended to replace JPEG images. A photograph saved as a PNG-24 will likely be at least 5 times larger than a equivalent JPEG image, with very little improvement in visible quality. (Of course, this may be a desirable outcome if you're not concerned about filesize, and want to get the best quality image you can.)

Just like PNG-8, PNG-24 supports alpha-transparency, too.

I hope that helps!


PNG-8 is a lossy format compared to PNG-24 which is lossless

  • 3
    You may want a bit more detail than this statement - perhaps explaining bit-depth... currently the system auto-tagged this a s a low-quality post due to extreme brevity. Commented Jul 23, 2019 at 16:35
  • 3
    Not necessarily. PNG8 is lossy only if the original image has more than 256 colors. You can continuously open and re-save a PNG8 image with no loss, so it's not lossy like how JPEG is lossy.
    – jamesdlin
    Commented Jul 23, 2019 at 18:31
  • PNG-8 is not "lossy". Lossy means EVERY time you save you lose data (see JPEGs) Commented Jul 6, 2022 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.