GLB is the glTF Binary file format, a single-file container that stores a complete glTF 2.0 asset, including its JSON scene description, geometry buffers, textures and animation data, in one little-endian binary package. Within 3D file formats & pipelines, it is the standard delivery format for real-time 3D on the web, in mobile augmented reality and in game engines.
The format is defined by the Khronos Group as part of the glTF 2.0 specification, which is also published as ISO/IEC 12113. A GLB file holds exactly the same data model as a text-based glTF asset; only the packaging differs. That design makes GLB a transmission format: it is optimized for loading and display, not for editing inside digital content creation tools.
How a GLB file is structured
A GLB file consists of a 12-byte header followed by a sequence of chunks, each with its own length and type field. The header contains the magic value glTF, the container version (currently version 2) and the total file length in bytes, which lets a loader validate the file before parsing it.
The first chunk is always the JSON chunk, which carries the same scene description that a .gltf file would contain: nodes, meshes, materials, accessors, animations and cameras. The optional second chunk is the BIN chunk, which holds raw vertex data, indices, animation keyframes and, in most exports, the embedded image files. Each chunk is padded to a 4-byte boundary so that typed arrays can be mapped directly into memory.
The following table summarizes the parts of a GLB file and their role during loading.
| Part | Size or content | Purpose |
|---|---|---|
| Header | 12 bytes: magic, version, length | Identifies and validates the file |
| JSON chunk | UTF-8 text, padded with spaces | Scene graph, materials, accessors |
| BIN chunk | Binary data, padded with zeros | Vertices, indices, keyframes, images |
| Chunk header | 8 bytes: length and type | Lets loaders skip unknown chunks |
Inside the JSON, a buffer without a uri property refers to the BIN chunk, and images reference it through bufferView indices instead of external paths. This self-contained referencing is what removes the loose sidecar files that make plain glTF assets fragile when they are copied or uploaded.
GLB compared with glTF and other formats
GLB differs from glTF only in packaging, but it differs from older interchange formats in purpose. A text .gltf file usually ships with a separate .bin buffer and image files, or embeds them as Base64 data URIs, which inflate binary data by about 33 percent. GLB stores the same bytes without that overhead and in one file.
The comparison below places GLB next to its closest neighbors in the topic.
| Format | Encoding | Main role | Typical limitation |
|---|---|---|---|
| GLB | Binary, single file | Web, AR and engine delivery | Hard to inspect or hand-edit |
| glTF | JSON plus external files | Delivery and debugging | Several files to keep together |
| FBX | Proprietary binary or ASCII | DCC and game engine exchange | Closed specification |
| OBJ | Plain text with MTL | Static mesh exchange | No animation or PBR materials |
| USDZ | Zipped USD package | AR on Apple platforms | Less common outside that ecosystem |
The practical consequence is that teams often author in FBX, USD or a native Blend file and export to GLB as the final step. GLB is rarely the master copy of an asset, because it bakes data into a form that discards modeling history, modifiers and rig controls.
What a GLB file can contain
A GLB file can carry everything a real-time renderer needs to draw a scene: triangle meshes, a node hierarchy, cameras, skins with joint weights, morph targets and keyframe animations. Materials follow the metallic-roughness PBR model, with base color, metallic, roughness, normal, occlusion and emissive textures.
Ratified Khronos extensions expand that baseline. The table lists the extensions most often found in production GLB files and what they change.
| Extension | Function | Effect on the file |
|---|---|---|
| KHR_draco_mesh_compression | Draco geometry compression | Meshes often 5 to 10 times smaller |
| EXT_meshopt_compression | Meshoptimizer buffer compression | Fast decoding, good with gzip |
| KHR_texture_basisu | KTX 2.0 textures with Basis Universal | Lower GPU memory use |
| KHR_materials_transmission | Thin transparent surfaces | Glass and liquids render correctly |
| KHR_lights_punctual | Point, spot and directional lights | Lights travel with the scene |
Extensions listed under extensionsRequired must be supported by the loader, or the file fails to load. Extensions under extensionsUsed alone are optional, and a viewer may fall back to simpler rendering.
Using GLB in production pipelines
In an asset pipeline, GLB is typically produced by an exporter or a conversion step and then optimized before publication. Command-line tools can deduplicate accessors, merge meshes, resize textures, apply Draco or meshopt compression and convert images to KTX 2.0. A validator run against the specification catches broken accessors, invalid indices and missing required data.
Choosing the right packaging depends on how the asset will be served and maintained, as the decision table shows.
| Situation | Recommended choice | Reason |
|---|---|---|
| Product viewer on a web page | GLB with compression | One request, small download |
| Debugging a broken export | glTF with separate files | JSON is readable in an editor |
| Textures shared by many models | glTF with external images | Images cache once across assets |
| Upload to a model marketplace | GLB | Single file cannot lose dependencies |
| Android AR via Scene Viewer | GLB | Required input format |
Real-time engines such as three.js, Babylon.js, Godot and Unreal import GLB directly, and browser components can display it with orbit controls and AR handoff. Most performance budgets for the web aim at files under a few megabytes, although the acceptable size depends on the audience, network and device class.
Limitations and common mistakes with GLB
GLB is efficient for delivery but has firm boundaries. It stores only triangles, lines and points, so NURBS, subdivision surfaces and procedural materials must be converted or baked before export. Its 32-bit length fields cap a single file at 4 GB, which large photogrammetry scans can approach.
- Uncompressed 4K textures usually dominate file size; resizing or KTX 2.0 conversion often matters more than mesh compression.
- Scale and axis errors arise because glTF uses meters and a Y-up, right-handed system, while some tools export in centimeters or Z-up.
- Shader-specific materials from renderers such as Cycles or Arnold do not survive export unless they are rebuilt with PBR textures.
- Required extensions like Draco break older viewers that lack the matching decoder.
- Treating GLB as a master file loses rigs, modifiers and layer structure that cannot be recovered.
In plain words
A GLB file is like a sealed shipping box for a 3D object. Everything the object needs to look right, its shape, colors, surface details and movements, is packed inside one file instead of being scattered across a folder.
That makes it easy to send, upload and open. A web page, a phone app or a game can load it in one step, and nothing gets lost along the way. The trade-off is that the box is built for showing the object, not for reshaping it, so artists keep their original working files separately.
A real-world example
A furniture retailer wants shoppers to rotate a lounge chair in the browser and place it in their living room through augmented reality. The 3D artist models the chair in a desktop application, bakes the fabric and wood into 2048-pixel PBR textures and exports the result as a GLB file of about 38 MB.
The web team then runs an optimization step: textures are converted to KTX 2.0, the mesh is compressed with Draco, and the file passes the validator. The final GLB weighs about 3.5 MB and loads in roughly two seconds on a typical mobile connection.
The same single file feeds the product page viewer and the Android AR handoff, while a USDZ version is generated for Apple devices. The outcome is one maintained asset per product instead of a folder of loose files for every channel.