This page follows The HDF Group’s HDF5 File Format Specification version 3.0, read 2026-11-12. Numbers are little-endian. Addresses are “size of offsets” bytes and lengths “size of lengths” bytes, both set in the superblock; an address of all one bits is undefined. Addresses count from the base address, normally the signature’s position.
Superblock
The signature 89 48 44 46 0D 0A 1A 0A is at byte 0, 512, 1024, 2048
or a later power of two; anything before it is a user block.
Versions 0 and 1
| Field | Size | Meaning |
|---|---|---|
| Signature | 8 | |
| Superblock version | 1 | 0 (the default), or 1, which adds the indexed storage internal node K field for a non-default B-tree K. |
| Free-space storage version | 1 | 0. |
| Root group symbol table entry version | 1 | 0. |
| Reserved | 1 | |
| Shared header message format version | 1 | 0. |
| Size of offsets | 1 | 2, 4, 8, 16 or 32. |
| Size of lengths | 1 | The same choices. |
| Reserved | 1 | |
| Group leaf node K | 2 | Half the entries a symbol table node holds. |
| Group internal node K | 2 | Half the rank of group B-tree nodes. |
| File consistency flags | 4 | Unused in these versions; ignored. |
| Indexed storage internal node K, reserved | 2 + 2 | Version 1 only. |
| Base address | O | |
| Free-space info address | O | Undefined. |
| End of file address | O | |
| Driver information block address | O | Undefined unless a special file driver (such as the family driver) was used. |
| Root group symbol table entry | … | See symbol table entry. |
Versions 2 and 3
| Field | Size | Meaning |
|---|---|---|
| Signature | 8 | |
| Superblock version | 1 | 2 (fewer fields, a checksum and a superblock extension) or 3 (as 2, but the consistency flags are used for file locking; added for the 1.10 release). |
| Size of offsets, size of lengths | 1 + 1 | |
| File consistency flags | 1 | Version 3: bit 0 opened for writing, bit 2 opened for single-writer/multiple-reader writing. |
| Base address | O | |
| Superblock extension address | O | An object header holding extra file-wide messages, or undefined. |
| End of file address | O | |
| Root group object header address | O | |
| Superblock checksum | 4 | Jenkins lookup3 hash of the bytes before it. |
Structure signatures
| Signature | Structure |
|---|---|
OHDR, OCHK | Version 2 object header and its continuation chunks |
TREE | Version 1 B-tree node (groups and chunked data) |
SNOD | Symbol table node (old-style groups) |
HEAP | Local heap (link names of old-style groups) |
GCOL | Global heap collection (variable-length data) |
BTHD, BTIN, BTLF | Version 2 B-tree header, internal and leaf nodes |
FRHP, FHDB, FHIB | Fractal heap header, direct and indirect blocks |
FSHD, FSSE | Free-space manager header and section list |
SMTB, SMLI | Shared object header message table and list |
FAHD, FADB | Fixed array header and data block (chunk index) |
EAHD, EAIB, EASB, EADB | Extensible array header, index, super and data blocks (chunk index) |
Object headers
Every group, dataset and named datatype has an object header: a list of messages.
Version 1
Version (1), reserved (1), number of messages (2), object reference count (4), object header size (4), padding to 8 bytes; then messages, each: type (2), size (2), flags (1), reserved (3), data, aligned to 8 bytes. Messages may continue in other blocks through continuation messages.
Version 2
| Field | Size | Meaning |
|---|---|---|
| Signature | 4 | OHDR. |
| Version | 1 | 2. |
| Flags | 1 | Bits 0–1: size of the chunk 0 size field (1, 2, 4 or 8 bytes). Bit 2: attribute creation order tracked. Bit 3: attribute creation order indexed. Bit 4: non-default attribute storage thresholds stored. Bit 5: times stored. |
| Access, modification, change and birth times | 4 × 4 | With bit 5, seconds since 1970. |
| Maximum compact, minimum dense attributes | 2 + 2 | With bit 4. |
| Size of chunk 0 | 1–8 | |
| Messages | … | Each: type (1), size (2), flags (1), creation order (2, with bit 2), data. |
| Gap, checksum | …, 4 | Unused bytes smaller than a message header, then a lookup3 checksum. |
Message flags
| Bit | Meaning |
|---|---|
| 0 | Constant: the message will not change. |
| 1 | Shared: the data is a reference to a message stored elsewhere. |
| 2 | Must not be shared. |
| 3 | A library that does not know the type must fail to open the object for writing. |
| 4 | A library that does not know the type should set bit 5 when it writes the object. |
| 5 | The object was changed by a library that did not know this message. |
| 6 | Shareable. |
| 7 | A library that does not know the type must fail to open the object at all. |
Symbol table entry
Used for the root group in superblock versions 0 and 1 and in symbol table nodes: link name offset in the local heap (O), object header address (O), cache type (4: 0 nothing cached, 1 the B-tree and heap addresses of a group, 2 a symbolic link’s name offset), reserved (4), scratch pad (16).