What Is a GLB File?
GLB is the format that made 3D assets practical on the web and in augmented reality. Unlike STL — which stores only geometry — a single GLB file can contain a complete 3D scene: meshes, materials, textures, animations, cameras, and lighting. This guide explains exactly what GLB is, what's inside it, and why it has become the dominant format for real-time 3D.
What GLB Stands For
GLB stands for GL Binary — specifically, the binary container format of the glTF (GL Transmission Format) specification. It was developed by the Khronos Group, the same consortium behind OpenGL, Vulkan, and WebGL, and the current specification is glTF 2.0 published in 2017.
The GLB format is sometimes called the "JPEG of 3D" because it was deliberately designed to be compact, fast to load, and universally supported — the same way JPEG became the universal format for photos on the web.
The Relationship Between GLB and glTF
GLB and glTF are the same specification but different packaging:
- glTF — a folder of files: a
.gltfJSON descriptor plus separate.binbinary files and texture image files - GLB — a single binary file containing all the same data — JSON, geometry buffers, and textures — merged into one package
The geometry, materials, and animations are identical between the two. GLB just bundles everything together so you can share, upload, or embed a 3D asset with a single file instead of a folder.
Use glTF when you need to edit texture files separately or hand-edit the JSON descriptor during development. Use GLB when you are shipping an asset to production, uploading to a web service, or sending to someone else. GLB wins for distribution; glTF wins for editing workflow.
What's Inside a GLB File
A GLB file can contain all of the following:
- Geometry (meshes) — triangle meshes with vertex positions, normals, UV coordinates, and vertex colors
- Materials — PBR (Physically Based Rendering) materials with albedo, metallic, roughness, normal maps, emissive maps, and occlusion maps
- Textures — embedded PNG or JPEG images for all material channels
- Animations — keyframe animations for position, rotation, and scale
- Skeletal rigging — bones, joints, and skin weights for character animation
- Morph targets — blend shapes for facial animation
- Cameras — perspective and orthographic camera definitions
- Scene hierarchy — parent-child node relationships and transforms
- Lights — via the KHR_lights_punctual extension (point, directional, spot)
The Binary File Structure
A GLB file has a clean three-section structure:
GLB Binary Layout
[ 12-byte file header ] → magic number, version, file length [ JSON chunk header (8 bytes)] → chunk type (JSON), chunk length [ JSON chunk data ] → the glTF scene descriptor as UTF-8 JSON [ BIN chunk header (8 bytes) ] → chunk type (BIN), chunk length [ BIN chunk data ] → geometry buffers + embedded textures
The JSON section describes the scene graph — which nodes exist, what meshes they reference, what materials they use, what animations play. The BIN section contains the raw binary data those references point to.
Everything GLB Can Store
| Feature | GLB | STL | FBX | OBJ |
|---|---|---|---|---|
| Triangle geometry | ✓ | ✓ | ✓ | ✓ |
| PBR materials | ✓ | ✗ | Partial | ✗ |
| Embedded textures | ✓ | ✗ | ✓ | ✗ |
| Skeletal animation | ✓ | ✗ | ✓ | ✗ |
| Morph targets | ✓ | ✗ | ✓ | ✗ |
| Scene hierarchy | ✓ | ✗ | ✓ | Partial |
| Open standard | ✓ | ✓ | ✗ | ✓ |
| Web/AR native | ✓ | ✗ | ✗ | ✗ |
| 3D printing | ✗ | ✓ | ✗ | Partial |
Why Real-Time Engines Love GLB
GLB was designed from the ground up for real-time rendering. Unlike FBX, which requires format conversion before use, GLB's binary data is structured so it can be passed directly to a GPU with minimal processing. Key reasons game engines and web renderers prefer it:
- GPU-ready buffers — vertex data is stored in interleaved arrays that map directly to WebGL/Vulkan buffer objects
- PBR native — materials use the metallic-roughness model that all modern rendering pipelines support natively
- Compressed textures — the KHR_texture_basisu extension allows Basis Universal compressed textures, dramatically reducing GPU memory usage
- Draco mesh compression — the KHR_draco_mesh_compression extension can reduce geometry size by 80–95%
- Open spec — no licensing fees, unlike FBX which is Autodesk proprietary
Browser and Platform Support
GLB has the broadest real-time 3D support of any format:
- Web — Three.js, Babylon.js, model-viewer (Google), <model-viewer> web component
- Game engines — Unity (via GLTFast), Unreal Engine (via runtime plugins), Godot (native)
- AR — WebXR, Google's SceneViewer (Android), model-viewer on iOS via AR Quick Look (with conversion to USDZ)
- Design tools — Figma (3D plugins), Canva, Spline, Adobe Substance
- Operating systems — Windows 11 Mixed Reality Viewer, macOS Quick Look (via converter)
GLB vs Other 3D Formats
| Format | Best For | Weakness |
|---|---|---|
| GLB | Web, AR, game engines, real-time | Not for 3D printing |
| STL | 3D printing | No color, no materials, no animation |
| FBX | DCC pipelines (Maya, 3ds Max), Unity import | Proprietary Autodesk format, larger files |
| OBJ | Simple textured meshes, legacy compatibility | No animation, no scene hierarchy |
| USDZ | Apple AR Quick Look on iOS/Vision Pro | Apple ecosystem only |
When to Use GLB
- Displaying 3D models on a website (
<model-viewer>or Three.js) - AR experiences on Android (Google SceneViewer) or WebXR
- Loading assets at runtime in Godot or Unity (with GLTFast)
- Shipping a 3D asset to someone with a single, self-contained file
- Storing a textured, animated character for real-time use
Do not use GLB for 3D printing — slicers cannot process it. Do not use it as your primary DCC (Digital Content Creation) working format — keep your Blender .blend or Maya .mb file as the master and export GLB for distribution only.
Frequently Asked Questions
Related Articles