Wondering what is actually inside a PNG file? Here is png chunks explained: every PNG is a series of labelled chunks, four critical ones that carry the image and optional ancillary ones that add extras like gamma or text.
This guide is part of our wider look at the png file format.
| Item | Value |
|---|---|
| Specification | RFC 2083, PNG Specification Version 1.0, March 1997 |
| Critical chunks | 4 critical chunks (IHDR, PLTE, IDAT, IEND) |
| Sample depths supported | 1 to 16 bits |
| Internet media type | image/png |
| Patent position stated in the spec | Patent-free replacement for GIF |
These figures come from the RFC 2083 text at the RFC Editor. Standards and their listings can change, so check the source before you rely on them.
What a PNG chunk is and why it matters
A PNG file is not one solid block of pixels. The RFC 2083 abstract describes PNG as an extensible file format for the lossless, portable, well-compressed storage of raster images, and the chunk is the unit that makes that extensibility work.
Each chunk is a self-contained labelled piece of the file. Some pieces describe the image, some hold the compressed pixels, and some hold optional information such as text or a last-modification time.
Splitting the file this way has practical benefits that the same abstract points to:
- Software can add new kinds of information without breaking older readers.
- The format supports full file integrity checking and simple detection of common transmission errors.
- The file is designed to be fully streamable, with a progressive display option for online viewing.
The 4 critical chunks
The spec’s table of contents, in the RFC 2083 text, groups chunks into two families. The critical chunks are the 4 critical chunks a decoder needs in order to make sense of an image, and each one has its own subsection.
- IHDR is the image header.
- PLTE is the palette, used by indexed-color images.
- IDAT is the image data itself.
- IEND is the image trailer, which marks the end of the file’s chunks.
The abstract says PNG supports indexed-color, grayscale and truecolor images plus an optional alpha channel. That range is why a palette has its own chunk instead of being a fixed part of every file.
Ancillary chunks: the optional extras
The second family is the ancillary chunks. As the RFC 2083 table of contents lays them out, these carry supporting details rather than the pixels, so a file can omit them and still be a valid picture.

The chunk names listed in the spec read like a checklist of image metadata:
- bKGD: background color.
- cHRM: primary chromaticities and white point.
- gAMA: image gamma.
- hIST: image histogram.
- pHYs: physical pixel dimensions.
- sBIT: significant bits.
- tEXt: textual data.
- tIME: image last-modification time.
- tRNS: transparency.
- zTXt: compressed textual data.
Several of these exist to help color matching, which fits the abstract’s note that PNG can store gamma and chromaticity data for improved color matching on different platforms.
Layout, naming, ordering and private chunks
Beyond the chunk list, the spec devotes whole sections to how chunks are put together. It has separate sections on chunk layout, chunk naming conventions and the CRC algorithm, so the rules for identifying and checking a chunk are written down in one place.
A further section covers chunk ordering rules, split into the behavior of PNG editors, the ordering of ancillary chunks and the ordering of critical chunks. If you want the byte-level picture of how these pieces sit together, our guide to png file structure is the natural next step.
The same specification also includes a section on the use of private chunks, which is where applications are guided on adding their own data without colliding with the standard set.
Extensions, animation and where chunks go next
The RFC’s contents list a section on a multiple-image extension and another on security considerations. Both show that the chunk design was meant to leave room for growth, and that reading unknown data carefully was a concern from the start.
If you are curious how animation fits a still-image format, our explainer on what is apng picks up that thread.
Keep in mind that RFC 2083 is the version 1.0 text from March 1997, so later revisions of the format may describe more than the chunks listed here. Treat the list above as the 1997 baseline, as published in the RFC Editor’s copy.
Where to look in the spec for each topic
If you want to read the original rather than a summary, this order follows the structure of the document:
- Start with the file structure section to see the signature, chunk layout, naming conventions and CRC algorithm.
- Move to the chunk specifications, which cover the critical chunks first and the ancillary chunks second.
- Read the chunk ordering rules to learn what editors must preserve.
- Finish with the recommendations for encoders and decoders if you are writing software.
The full text is hosted by the RFC Editor, and it is long, so jump straight to the section you need.
Frequently asked questions
Do I need every chunk for a PNG to display?
Show answer
No. The spec splits chunks into critical and ancillary families, and the ancillary ones are supporting details such as text, gamma or a timestamp. The critical set is the part a viewer cannot do without.
Which chunk holds the actual picture?
Show answer
The IDAT chunk, which the RFC 2083 table of contents names as the image data. IHDR describes the image, PLTE adds a palette where needed, and IEND closes the sequence.
Can a PNG store text?
Show answer
Yes. Two ancillary chunks, tEXt and zTXt, are listed for textual data, with the second one holding it in compressed form. Because they are ancillary, many files simply leave them out.
How does PNG notice a damaged file?
Show answer
The abstract promises full file integrity checking and simple detection of common transmission errors. The spec also describes a CRC algorithm in its own section, though the finer detail is best read in the RFC itself.
Can software add its own chunks?
Show answer
The specification includes guidance on the use of private chunks, so the format anticipates applications storing extra data. Follow the naming and ordering rules in the RFC if you plan to do this.



