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?


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.

| improve this answer | |

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.

| improve this answer | |
  • whenever I save a photoshop image to png file then is it png-8 or png-24? – LiziPizi Sep 4 '16 at 15:57
  • @LiziPizi: you get to choose that. – Jongware Sep 4 '16 at 16:44
  • 1
    LiziPizi. If you do not understand the diference use Png 24 (Or plain Png) – Rafael Sep 4 '16 at 17:32
  • @rafael Sorry for questioning again but you just said "plain png". what does it mean? – LiziPizi Sep 5 '16 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 Sep 5 '16 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.

| improve this answer | |
  • 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. – Scribblemacher Sep 6 '16 at 15:51

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

| improve this answer | |
  • 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. – GerardFalla Jul 23 '19 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 Jul 23 '19 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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