PNG signature at offset 0
89 50 4E 47 0D 0A 1A 0AThe signature occupies offsets 0x00–0x07. It includes the ASCII letters PNG plus bytes chosen to expose common text-transfer and line-ending corruption.
IHDR header fields and offsets
The first chunk starts immediately after the signature. A conforming PNG uses a 13-byte IHDR data field.
| Offset | Length | Field | Interpretation |
|---|---|---|---|
| 0x08 | 4 | Chunk data length | Big-endian; normally 13 for IHDR |
| 0x0C | 4 | Chunk type | ASCII IHDR (49 48 44 52) |
| 0x10 | 4 | Width | Unsigned big-endian pixels; zero is invalid |
| 0x14 | 4 | Height | Unsigned big-endian pixels; zero is invalid |
| 0x18 | 1 | Bit depth | 1, 2, 4, 8, or 16 subject to color type |
| 0x19 | 1 | Color type | Grayscale, truecolor, indexed, or alpha variants |
| 0x1A | 1 | Compression | Method 0 |
| 0x1B | 1 | Filter | Method 0 |
| 0x1C | 1 | Interlace | 0 for none, 1 for Adam7 |
| 0x1D | 4 | IHDR CRC | CRC over chunk type and data |
PNG chunk layout
Every chunk stores a four-byte big-endian data length, a four-byte ASCII type, the declared data bytes, and a four-byte CRC. Critical image data appears in one or more IDAT chunks; IEND terminates the datastream.
Chunk lengths vary, so only the signature and first IHDR locations are fixed. To navigate later chunks, read each length and advance by length + 12 bytes from the start of that chunk.
Practical PNG inspection checks
- Confirm the full eight-byte signature, not only the letters PNG.
- Check that IHDR is first and declares 13 data bytes.
- Interpret width and height as unsigned big-endian integers.
- Check that the bit-depth and color-type combination is permitted by the PNG specification.
- Use a format-aware validator to verify every chunk length, ordering rule, and CRC.
Local processing and privacy
The PNG file format workflow opens the same Bitpeek browser workspace. Selected file bytes, file names, pasted input, searches, edits, hashes, and comparison data are processed in local browser memory and are not sent to a Bitpeek server.
The static guide itself can be read without opening a file or creating an account.
Technical reference: W3C PNG Specification, Third Edition.
Frequently asked questions
Are PNG integers little-endian?
No. PNG multi-byte integers, including chunk lengths, width, and height, use network byte order (big-endian).
Is IHDR always at offset 0x0C?
For a valid PNG datastream, yes. The eight-byte signature is followed by the first chunk length at 0x08 and the IHDR type at 0x0C.
Can Bitpeek validate a complete PNG?
Bitpeek can expose bytes, interpretations, CRC values for selections, and the leading signature. A dedicated PNG validator is still needed for full conformance.