Format:glTF
| Magic | 67 6C 54 46 (glTF) for .glb; JSON text for .gltf |
|---|---|
| Extensions | .gltf, .glb, .bin |
| Endianness | little-endian |
| On this wiki | Facts · Code · Notes · Topics |
Khronos glTF 2.0, the JSON-based 3D scene format, and its single-file binary container GLB: a 12-byte little-endian header (magic 0x46546C67 "glTF", version 2, total length) followed by a JSON chunk (0x4E4F534A) and an optional BIN chunk (0x004E4942), each 4-byte aligned.
Overview
A .gltf file is JSON referencing external .bin buffers and images (or data: URIs). A .glb packs the JSON, the buffers and the images into one binary blob. The media types are model/gltf+json and model/gltf-binary. Games and apps use glTF/GLB as an interchange or asset-delivery format.
GLB layout
A 12-byte header of three uint32 values (magic, version, length) is followed by chunks of (uint32 chunkLength, uint32 chunkType, data). The header version is the container version (2); the glTF asset version is separate and lives in the JSON chunk. Chunk 1 must be the JSON chunk, padded with spaces (0x20) to a 4-byte boundary; chunk 2, if present, is the BIN chunk, padded with zeros. Unknown chunk types must be ignored by readers. See Fact:glTF/struct/GLB header and chunks.
Code & repositories
The specification is in KhronosGroup/glTF (specification/2.0).
- https://github.com/KhronosGroup/glTF @
521a91d491f02bb7db7d445b35f591d09d2a64ce· license: CC-BY-4.0 (declared by the contributor for the files used; GitHub reports CC-BY-4.0 (read from COPYING.adoc; GitHub's detector did not classify it) for the repository)
glTF specification sources (specification/2.0/Specification.adoc holds the GLB layout)
Tested on: source read, not run: documentation read · checked 2026-10-19; last activity 2026-10-13; Note: the latest release ships binaries; the wiki links only the source, never the binaries