Not sure what you’re dealing with when a PNG lands on your desktop? The PNG file format stores images losslessly, with optional transparency, so every pixel stays exactly as you saved it.
| Item | Value |
|---|---|
| Sample depth range | 1 to 16 bits |
| Grayscale maximum | 16 bits per pixel |
| Truecolor maximum | 48 bits per pixel |
| Indexed-color maximum | 256 colors |
| Internet media types | image/png and image/apng |
The figures above come from the PNG specification, version 1.2 and the W3C PNG specification editor’s draft. Specifications get revised, so the figures can change: check the source before you rely on them.
What is a PNG file?
A PNG file is a raster image stored in the Portable Network Graphics format, which the W3C specification says is pronounced “ping”.
The same draft describes the format as an extensible file format for the lossless, portable, well-compressed storage of static and animated raster images. In plain terms, you get a picture made of pixels, packed down without throwing any detail away.
According to the version 1.2 specification, the initial motivation was to replace GIF, yet the design added useful features GIF never had. RFC 2083, dated March 1997, calls PNG a patent-free replacement for GIF that can also replace many common uses of TIFF.
If you have a PNG that will not display, start with the walkthrough on how to open a png file.

Color types, bit depth and alpha: what a PNG can hold
The format supports three kinds of image, plus an optional alpha channel, as RFC 2083 explains: indexed-color, grayscale and truecolor. The version 1.2 specification gives the limits: indexed-color images hold up to 256 colors, grayscale images reach 16 bits per pixel and truecolor images reach 48 bits per pixel.
The W3C glossary defines sample depth as the number of bits used to represent a sample value. Both the W3C draft and RFC 2083 state that sample depths range from 1 to 16 bits.
Colors can travel with their context too. The W3C draft says PNG can store color space data for improved color matching across different platforms, and the version 1.2 specification lists image gamma information as a feature so brightness and contrast display correctly regardless of the machines involved.
For a closer look at the alpha channel, read the explainer on what is a transparent png. To see how palette-based and full-color files differ in practice, read the comparison of png-8 vs png-24.
Lossless compression: how PNG shrinks files without losing detail
The W3C draft defines lossless as a method of data compression that permits reconstruction of the original data exactly, bit-for-bit. It also lists losslessness as a design goal, saying that filtering and compression should preserve all information.
The glossary in the W3C draft describes deflate, the compression method behind PNG, as a member of the LZ77 family. The version 1.2 specification adds that indexed-color and truecolor images are compressed as effectively as in any other widely used lossless format, and in most cases more effectively.
The design also favors the viewer over the author. The W3C draft calls fast encoding a less important goal than fast decoding, so the format is tuned for opening images quickly rather than for writing them quickly.
If you want the short version of the question is png lossless, the answer is yes, and a dedicated page covers it in depth. Many people also ask why are png files so large, and a separate page takes that question on.

Built-in features: transparency, progressive display and error checking
Beyond pixels, a PNG carries several practical features. These are the ones the specification lists:
| Feature | What it does |
|---|---|
| Transparency | Portions of the image can be marked as transparent, creating the effect of a non-rectangular image. |
| Progressive display | A suitably prepared file can show a low-resolution image very quickly, then gain detail as it is received. |
| Streamability | Files can be read and written serially, so images can be generated and displayed on the fly. |
| Corruption detection | Software gets reliable, straightforward detection of file corruption. |
| Ancillary information | Textual comments and other data can be stored within the image file. |
| Gamma information | Supports automatic display with correct brightness and contrast across machines. |
The descriptions above paraphrase the version 1.2 specification. Specifications get revised, so check the source before you rely on the wording.
RFC 2083 says PNG is designed to work well in online viewing applications, such as the World Wide Web, so it is fully streamable with a progressive display option. It adds that PNG is robust, providing both full file integrity checking and simple detection of common transmission errors.
To see how a file is divided into parts, the walkthrough of png file structure breaks it down step by step.
How PNG compares with GIF, JPG and APNG
GIF was PNG’s starting point. The version 1.2 specification lists these GIF features as retained in PNG:
- Indexed-color images
- Streamability
- Progressive display
- Transparency
- Ancillary information such as textual comments
The same specification names truecolor images, a full alpha channel, image gamma information and reliable detection of file corruption as new features not available in GIF. A feature-by-feature look at png vs gif goes through these points in more depth.
For another format people often weigh against PNG, see the page on png vs jpg.
On the animated side, the W3C draft defines two Internet media types, image/png and image/apng. The explainer on what is apng covers that variant.

Specifications, editing and everyday use
One foundational reference is RFC 2083, dated March 1997. Its status section says the memo does not specify an Internet standard of any kind, and the document defines the Internet Media Type image/png.
The version 1.2 specification is a revision of the PNG 1.0 specification, which was published as RFC-2083 and as a W3C Recommendation. At the time of that document, the revision had not been approved by any standards body, and the specification was on a standards track expected to produce ISO/IEC International Standard 15948.
The W3C’s editor’s draft of the Fourth Edition says that, as of that draft, the specification is intended to become an International Standard but is not yet one. You can read it at the W3C PNG draft. Because an editor’s draft keeps changing, check the live page before you cite its status.
Whichever edition you read, interchangeability is a stated goal in the W3C draft: any standard-conforming PNG decoder shall be capable of reading all conforming PNG datastreams.
A PNG editor, in the W3C draft’s wording, creates a modification of an existing datastream while preserving unmodified ancillary information wherever possible. For hands-on steps, see the hub on how to edit png images.
If you are choosing a format for a site, the hub on the best image format for websites puts PNG next to its alternatives. This site is independent, with no affiliation to any software vendor, format body or tool maker, and any tool mention is editorial only.
Frequently asked questions
Does saving a PNG reduce its quality?
Show answer
Not through compression. Because the W3C draft treats PNG compression as fully reversible, a decoded file matches what was originally stored.
Can a PNG contain an animation?
Show answer
Yes, in its animated variant. Besides image/png, the W3C draft defines image/apng, and frame-based animation falls within its stated scope. Because the draft keeps changing, check it before you rely on this.
Is PNG an official international standard?
Show answer
The sources used here point to no. The March 1997 memo RFC 2083 is informational, and the Fourth Edition editor’s draft stops short of calling the specification an International Standard. Check both pages for updates.
Is PNG meant to replace GIF?
Show answer
That was the original motivation, per the version 1.2 specification. It also says PNG offers features GIF lacks, such as a full alpha channel.



