How PNG Information Is Stored Inside Binary Chunks (IHDR to IEND)
Every valid Portable Network Graphics file opens with an 8-byte signature (`89 50 4E 47 0D 0A 1A 0A`) followed by a linear sequence of self-describing binary chunks. Each chunk carries a 4-byte big-endian payload length, a 4-character ASCII type code, the raw payload bytes, and a 4-byte CRC-32 checksum. Because the case of the first letter indicates whether a chunk is critical (uppercase, such as `IHDR`, `PLTE`, `IDAT`, `IEND`) or ancillary (lowercase, such as `tEXt`, `iTXt`, `zTXt`, `caBX`, `tIME`), decoders can safely skip or audit ancillary PNG metadata without touching compressed pixel scans.
That clean chunk design explains why AI generators embraced this lossless format as the default container for reproducible generation recipes. Whenever you open a render inside a free PNG metadata viewer or free PNG info viewer, the parser walks those 4-byte chunk boundaries directly in memory—surfacing exact PNG info, prompt keywords, and byte offsets in a few milliseconds.
Understanding critical versus ancillary chunks also helps you verify how much extra weight hidden PNG information adds to an export. Large ComfyUI workflow JSON graphs and signed caBX manifests routinely add 15 KB to 150 KB of ancillary bytes ahead of the IDAT pixel stream. Auditing your metadata PNG structure and embedded PNG information before publishing keeps both your creative IP and file sizes lean.
“A Portable Network Graphics file consists of an 8-byte signature followed by a series of chunks. Ancillary chunks (beginning with a lowercase letter) such as tEXt, zTXt, iTXt, and tIME convey optional textual, device, and provenance metadata separately from IDAT image data.”









