.GLTF GL Transmission Format
.gltf

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.

Model structure
glTF (67 6C 54 46)
JSON chunk
BIN chunk
accessor
BinaryMetadata
Not convertible

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

Frozen since 2017
glTF 2.0 still current after 7 years
Khronos released glTF 2.0 in June 2017 and has not needed a major version bump since. The KHR_* extension system carries all feature additions — clearcoat, transmission, volume, iridescence, Draco compression — without breaking the core spec. Seven years of real-time rendering innovation shipped as extensions.
12 bytes of magic
67 6C 54 46 plus version plus length
A .glb file opens with a 12-byte header: the ASCII string `glTF` (67 6C 54 46), a 4-byte version number, and a 4-byte total file length. After that come two chunks — JSON manifest (type `JSON` = 0x4E4F534A) and binary buffer (type `BIN\0` = 0x004E4942).
AR from a QR code
Android Scene Viewer, Apple Quick Look, web XR
Point your phone at a QR code and a 3D model floats in your kitchen. Google's Android Scene Viewer renders glTF/GLB natively; Apple converts glTF to USDZ for iOS Quick Look; model-viewer handles the web fallback. One format, three AR pipelines.
40+ KHR extensions
Clearcoat, iridescence, Draco, and counting
Khronos maintains 40+ KHR_* extensions for glTF 2.0 — KHR_materials_clearcoat, KHR_materials_transmission, KHR_materials_iridescence, KHR_materials_anisotropy, KHR_draco_mesh_compression (90% geometry reduction), KHR_mesh_quantization. The extension registry replaced versioning entirely.

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

.GLTF compared to alternative formats
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.

OffsetLengthFieldExampleDescription
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
2015Khronos Group releases glTF 1.0 — first GL Transmission Format with bespoke shader definitions2017glTF 2.0 released (June) — replaces bespoke shaders with PBR metallic-roughness; still the current spec2019Blender 2.80 ships native glTF import/export — cements glTF as the default 3D asset interchange2019Google launches Android Scene Viewer and the `<model-viewer>` web component — mainstream web AR2021Apple Quick Look accepts glTF/GLB with automatic USDZ conversion — iOS AR accessibility via upstream glTF2022Khronos ratifies KHR_materials_iridescence and KHR_materials_anisotropy — advanced PBR lands in consumer web2024glTF 2.0 remains current — the extension system has eliminated the need for a major version bump in 7+ years
Validate glTF structure with Khronos validator other
npx gltf-validator model.glb --format json

Runs the official Khronos glTF-Validator via npx, outputting a JSON report of errors, warnings, and hints. Catches accessor misalignment, missing buffer references, and extension compatibility issues.

Extract GLB to separate glTF + bin files other
python3 -c "import pygltflib; g=pygltflib.GLTF2().load('model.glb'); g.save('model.gltf')"

Uses the pygltflib Python library to load a GLB container and re-save it as a separate .gltf JSON manifest plus .bin buffer file. Helpful when you need to inspect or edit the JSON manifest directly.

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.

LOW

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.

Blender tool
Primary creator/editor — free open-source 3D software with native glTF 2.0 import/export since Blender 2.80 (July 2019). Where most glTF files are authored
Three.js library
Most-used web 3D consumer runtime. GLTFLoader is a first-class feature; powers millions of web pages rendering glTF scenes in the browser
model-viewer library
Google's web component that renders glTF/GLB with a single `<model-viewer>` HTML tag. Delegates to Android Scene Viewer for AR mode; converts to USDZ for iOS
Babylon.js library
Alternative web 3D engine from Microsoft with native glTF support, strong physics, and XR features for WebXR applications
Open-source game engine with native glTF 2.0 import. Imports materials, animations, and skeletal rigs directly into Godot's scene system
Reference validator from Khronos Group. Catches accessor misalignment, missing buffer references, extension compatibility issues, and spec violations before production
CLI optimization toolkit — Draco compression, mesh quantization, texture resizing, buffer realignment. Standard tool for shipping production-optimized GLB files
Reference PBR implementation from Khronos. Renders glTF with the spec's canonical material model — baseline for comparing other renderers