GL Transmission Format
A glTF file stores a 3D scene — geometry, materials, animations, cameras — in a JSON manifest plus binary buffers. `.glb` packs it all in one file; `.gltf` spreads it across three or more. Khronos Group froze the 2.0 spec in 2017 — 40+ official extensions do what version bumps usually would.
glTF conversion is not yet available in FileDex. For now, use the CLI commands in the Developer Door to convert between 3D formats with Blender or gltf-pipeline.
Common questions
How can I open and inspect a glTF or GLB file?
Use the online glTF Viewer at gltf-viewer.donmccurdy.com or open it in Blender via File > Import > glTF 2.0. VS Code with the glTF Tools extension lets you preview the 3D model and browse the JSON manifest side by side. For programmatic inspection, Three.js Editor in any browser loads GLB files with drag-and-drop.
What is the difference between glTF and GLB?
glTF uses a separate JSON manifest file plus external .bin and image files, while GLB packages everything into a single binary container. The internal data structure is identical in both cases. GLB is preferred for distribution because it avoids missing-file problems, while separate glTF is easier to edit and version-control.
Does glTF support animations and skeletal rigging?
Yes, glTF 2.0 natively supports skeletal animation, morph targets, and keyframe-driven property animation. Animations reference channels that target specific node properties (translation, rotation, scale, or morph weights). Skin objects define joint hierarchies with inverse bind matrices for skeletal deformation.
Why is glTF called the JPEG of 3D?
The name reflects glTF's design goal as a universal transmission format, similar to how JPEG standardized image interchange. Its JSON+binary split allows progressive loading: renderers parse the lightweight scene graph first, then stream heavy geometry and textures on demand. Wide adoption across browsers, game engines, and AR platforms reinforces the analogy.
How do I add a 3D model to my website using glTF?
Use Google's `<model-viewer>` web component — a single HTML tag that renders interactive glTF/GLB models with rotation, zoom, and optional AR mode. Import the library from CDN, add `<model-viewer src="model.glb" camera-controls auto-rotate ar></model-viewer>` to your page. Scene Viewer handles Android AR, and on iOS the component delegates to Apple Quick Look by serving a USDZ fallback.
What makes .GLTF special
An STL file shows you a mesh. A glTF file shows you a world. Where STL carries triangles and nothing else, glTF packs scenes, materials, animations, cameras, and a binary buffer of raw vertex data into either a JSON manifest or a single .glb container. Khronos calls it the JPEG of 3D for a reason.
Continue reading — full technical deep dive
STL Stores Triangles. glTF Stores an Entire 3D World. What's the Difference?
A glTF file describes a 3D scene the way a browser builds a web page: a top-level container that holds a hierarchy of nodes, each node carrying a transform, a mesh reference, or a camera/light. Meshes reference primitives; primitives reference accessors; accessors describe typed views into raw binary buffers that map one-to-one with how a GPU expects vertex data.
That hierarchy is the design. Khronos chose a JSON manifest so that a browser or game engine can parse the scene graph and start issuing GPU uploads before the heavy geometry has finished downloading. By the time the .bin buffer arrives, the renderer already knows which accessor spans which bytes, what component type (float, uint16, uint32) they represent, and which GPU attribute slot they feed. No parsing of the binary is needed — just allocate a buffer on the GPU and memcpy.
This is what makes glTF the 'JPEG of 3D.' JPEG decouples metadata from image data; glTF decouples scene structure from geometry. STL was built for a 3D printer — one mesh, no metadata. glTF was built for a browser's rendering pipeline — a world with cameras, lights, skins, animations, and materials, streamed in parallel. That choice shapes how the file is packaged — and glTF gives you two ways to package it.
One Scene, Two File Formats. When Do You Use .gltf and When .glb?
glTF ships in two flavors. The .gltf file is a JSON manifest that references separate .bin files for binary buffers and .png/.jpg files for textures. The .glb file packages everything into a single binary container.
A GLB file begins with 12 magic bytes: 67 6C 54 46 (ASCII glTF), followed by a 4-byte version (currently 2), followed by a 4-byte total file length. After the header come two chunks. Chunk 0 holds the JSON manifest — marked with chunk type 0x4E4F534A (JSON in ASCII). Chunk 1 holds the binary buffer — marked with chunk type 0x004E4942 (BIN\0 in ASCII). Each chunk begins with 4-byte length + 4-byte type before the payload. The JSON chunk is padded with ASCII spaces to a 4-byte boundary; the BIN chunk is padded with null bytes.
The design trade-off is explicit. .gltf plus sidecar files works well for authoring and version control — a Blender artist can commit the JSON, update individual textures, and diff changes meaningfully. .glb works better for distribution — one file, no missing-sidecar problems, trivial drag-and-drop for AR previewers. Most 3D pipelines produce .glb for shipping and .gltf for source. The data inside is identical; the packaging is the choice. The packaging is the choice. The materials rendered inside are where glTF caught up to modern expectations — without ever changing its version number.
The Core Format Hasn't Changed Since 2017. Why Does It Still Render Modern Materials?
A glTF material isn't a color. It's a physically-based rendering recipe with 40+ Khronos extensions to refine it.
The core material model is metallic-roughness PBR, specified in glTF 2.0: a base color (RGB), a metallic factor (0-1), a roughness factor (0-1), a normal map for surface detail, an ambient-occlusion map for contact shading, and an emissive color for self-illumination. That base covers about 80% of real-world materials — wood, plastic, painted metal, fabric.
The remaining 20% ships as KHR_* extensions. KHR_materials_unlit disables lighting for icons and UI elements. KHR_materials_clearcoat adds a second specular layer for car paint or nail polish. KHR_materials_transmission handles glass and clear liquids. KHR_materials_volume models absorption through translucent materials. KHR_materials_sheen simulates velvet and brushed fabric. KHR_materials_iridescence reproduces soap-bubble and beetle-shell color shifts. KHR_materials_anisotropy captures brushed metal.
Compression extensions attack a different problem. KHR_draco_mesh_compression reduces geometry size by 90% or more through vertex prediction. KHR_mesh_quantization lets attributes use lower-precision integer types for similar gains with no dependency on external decoders. KHR_texture_transform adds UV offset and tiling without modifying the source texture.
Khronos froze the glTF 2.0 core spec in 2017. Everything since — seven years of real-time rendering innovation — has shipped as extensions. The version never changed because it didn't need to. Modern renderers speak glTF 2.0 plus whichever extensions the viewer supports, and the rest degrade gracefully to the metallic-roughness base. The format stayed still. The ecosystem moved. And nowhere did that movement go further than mobile AR.
Point Your Phone at a QR Code. A 3D Model Floats in Your Kitchen. How?
Point your phone at a QR code and a 3D model floats in your kitchen. It's glTF — until iOS converts it to USDZ.
Google built the cross-platform AR stack around glTF. Android's Scene Viewer accepts GLB URLs directly from web pages; Google's <model-viewer> web component renders interactive 3D previews with a single HTML tag and delegates to Scene Viewer for AR mode. Three.js, Babylon.js, and PlayCanvas all ship native glTF loaders as first-class features. Unreal Engine, Unity, Godot, Blender, Sketchfab, and Adobe Dimension export to glTF for web delivery.
Apple's Quick Look is the exception — iOS renders USDZ (Pixar's Universal Scene Description in a ZIP), not glTF. But even Apple's pipeline accepts glTF upstream. Tools like Reality Composer Pro and adopted web components convert glTF to USDZ automatically when targeting iOS AR.
Museums and cultural institutions have turned glTF into a heritage-preservation format. The Smithsonian's 3D Digitization Program publishes artifact scans as glTF for web virtual tours. The British Museum's CyArk partnership captures UNESCO World Heritage sites as glTF assets. Google Arts & Culture hosts thousands of 3D-scanned artifacts worldwide. E-commerce drove mainstream adoption: IKEA's Place app, Amazon's 3D product previews, and Shopify's AR Quick Look integration all use glTF/GLB assets to render furniture and products in a customer's own room before purchase.
glTF quietly became the cross-platform 3D standard the web always wanted.
.GLTF compared to alternatives
| Formats | Criteria | Winner |
|---|---|---|
| .GLTF vs .STL | Scene vs geometry glTF stores a complete 3D scene: nodes, hierarchies, materials (PBR), animations, skins, cameras, lights. STL stores only triangular facets with no material, no animation, and no scene concept. glTF is for displaying; STL is for 3D-printing. | GLTF wins |
| .GLTF vs .OBJ | Modern material model + animation glTF mandates PBR metallic-roughness materials and supports skeletal animation, morph targets, and keyframe property animation. OBJ defines only vertices, normals, UVs, and faces; material support is via the 1980s-era Phong MTL companion format. glTF for modern pipelines; OBJ for simple static meshes. | GLTF wins |
| .GLTF vs .FBX | Transmission vs authoring glTF is optimized for runtime transmission — parsed once, uploaded to GPU, rendered. FBX is optimized for authoring pipelines — carries DCC-specific data like constraints, rigs with IK/FK, and custom properties. Artists work in FBX; distributors ship glTF. | Draw |
| .GLTF vs .USDZ | Web and Android vs Apple AR glTF is the web and Android AR standard (Google Scene Viewer, model-viewer, Three.js). USDZ is Apple's Quick Look format (Pixar's USD in a ZIP). Both describe 3D scenes; different packaging conventions for different platforms. Most pipelines author in glTF and convert to USDZ for iOS. | Draw |
Technical reference
- MIME Type
model/gltf+json- Developer
- Khronos Group
- Year Introduced
- 2015
- Open Standard
- Yes — View specification
Binary Structure
A .glb (binary glTF) file starts with a 12-byte header: 4-byte magic (`67 6C 54 46` = ASCII `glTF`), 4-byte version (currently 2, little-endian), and 4-byte total file length. After the header come two chunks, each prefixed with a 4-byte length and a 4-byte type marker. Chunk 0 is the JSON manifest (type `0x4E4F534A` = ASCII `JSON`), containing the scene graph, material definitions, animations, accessors, and bufferView declarations. Chunk 1 is the binary buffer (type `0x004E4942` = ASCII `BIN\0`), containing interleaved vertex data, indices, and optionally embedded textures. The JSON chunk pads to a 4-byte boundary with ASCII space characters; the BIN chunk pads with null bytes. A .gltf (JSON variant) file has no binary header — it is plain UTF-8 JSON with references to external .bin and image files.
| Offset | Length | Field | Example | Description |
|---|---|---|---|---|
0x00 | 4 bytes | Magic | 67 6C 54 46 | ASCII `glTF` — identifies the file as a binary glTF container. Only present in .glb variant; .gltf has no magic bytes |
0x04 | 4 bytes | Version | 02 00 00 00 | glTF version number (little-endian uint32). Currently always 2 since glTF 2.0 (June 2017) |
0x08 | 4 bytes | Total length | variable | Total file size in bytes including the 12-byte header. Little-endian uint32. Loaders read this to validate file completeness |
0x0C | 4 bytes | Chunk 0 length | variable | Size of the JSON manifest chunk in bytes (little-endian uint32), excluding the 8-byte chunk header |
0x10 | 4 bytes | Chunk 0 type | 4A 53 4F 4E | ASCII `JSON` (type 0x4E4F534A). Marks the JSON manifest chunk that follows immediately |
after JSON | 8 bytes | Chunk 1 header | len + 42 49 4E 00 | BIN chunk header: 4-byte length + 4-byte type `BIN\0` (0x004E4942). Contains geometry, index, animation keyframe, and optionally embedded image data |
glTF conversion is not yet available in FileDex. For now, use the CLI commands in the Developer Door to convert between 3D formats with Blender or gltf-pipeline.
Attack Vectors
- External URI resolution
- Base64 data-URI memory exhaustion
- Draco decompression integer overflow
- Accessor byte-offset abuse
Mitigation: Open glTF files only in trusted 3D renderers. Disable URI dereferencing in server-side parsers to prevent external resource fetch exploits. Cap Draco decompression memory and validate accessor bounds before GPU upload. Treat glTF from unknown sources like any executable payload. FileDex does not parse glTF — this page is static, no upload.
- Specification glTF 2.0 Specification — Khronos Group
- Specification glTF Extension Registry (KHR_*)
- Documentation glTF Validator — Reference Implementation
- Documentation Google model-viewer Web Component
- Registry IANA model/gltf+json media type