How Are GLB Chunk Types Defined and Ordered?

A GLB container packages glTF 3D assets into a single binary stream composed of a 12-byte file header followed by sequentially packed data chunks. Each chunk consists of an 8-byte descriptor header—storing its byte length and a 4-byte ASCII type code—paired with a payload aligned to a 4-byte boundary. The glTF 2.0 specification enforces a strict sequence: a JSON metadata chunk must appear first, followed by an optional binary buffer chunk, alongside any application-defined extension chunks.

Anatomy of a GLB Chunk

Every chunk inside a GLB file follows an explicit 8-byte chunk header format before its data payload:

To preserve memory alignment requirements for CPU and GPU processing, each chunk payload must be padded with trailing characters so that the entire chunk ends on a 4-byte boundary.

Chunk Types in glTF 2.0

The glTF 2.0 standard defines two primary chunk types:

  1. Structured JSON Content (JSON):
  1. Binary Buffer (BIN\0):

Required Chunk Ordering

GLB parsers read chunks sequentially starting immediately after the initial 12-byte file header (magic, version, and length). The specification mandates strict ordering rules: