glTF and GLB hold the same model
glTF 2.0, the Khronos Group format for 3D scenes, can be stored in two ways. A .gltf file is JSON that describes the scene, nodes, meshes, materials and animations; it refers to binary geometry in one or more .bin files and to textures as separate images, or embeds them as base64 data URIs. A .glb file is the binary container defined by the same specification: a JSON chunk plus an optional binary chunk that usually holds the buffers and images. A GLB may still refer to external files, so check for external references before delivering it as a single file.
Converting between them should change the packaging, not the content: geometry, materials, the node hierarchy, extras and extensions stay as they were. Tools differ in the details, such as removing unused elements or compression, so know what yours does and compare the result with the source.
| Aspect | glTF (.gltf) | GLB (.glb) |
|---|---|---|
| Files | JSON plus .bin and image files, or one JSON file with embedded data | Usually one binary file; external references are allowed |
| Readable in a text editor | Yes, the JSON part | No |
| Typical use | Inspection, editing, debugging and version control | Delivery, web viewers, AR and asset libraries |
| Main risk | Missing or renamed companion files | Harder to inspect without a tool |
Official references
Check the source before converting
- Keep the .gltf, its .bin files and its textures together, with the folder structure and file names the JSON refers to.
- Open the source in a viewer and note the node count, materials and overall size, so you can compare after conversion.
- Run the Khronos glTF Validator on the source; errors in the source carry into the GLB.
- Check which extensions the model uses, such as Draco or meshopt compression or KTX2 textures, and whether the receiving application supports them.
- List any external URIs the model refers to, so you can confirm they are packed into the GLB or delivered with it.
Official references
Convert with an established tool
Use a tool that writes the binary container defined by the specification; renaming a .gltf file to .glb does not convert it. Common options:
| Tool | How to convert | Notes |
|---|---|---|
| glTF Transform (command line) | gltf-transform copy model.gltf model.glb | Preserves scene data; interleaves vertex data and removes Draco compression |
| gltf-pipeline (command line) | gltf-pipeline -i model.gltf -o model.glb --keepUnusedElements | Without that flag it removes unused nodes, meshes and materials |
| Blender | Import the glTF, then export as glTF Binary (.glb) | Passes through Blender's own scene model, so check materials and extras afterwards |
Keep conversion and optimisation as separate, recorded steps. Compression, texture resizing and mesh simplification change the content and should be agreed with the recipient.
Official references
Verify the GLB
Validate
Run the glTF Validator on the GLB and compare its report with the source report. New errors or warnings point to the conversion.
Compare
Open both files in the same viewer and compare the node count, materials, textures and scale. glTF uses metres with Y up, so a model that appears rotated or scaled was either already that way in the source or was changed by an intermediate tool.
Test in the receiver
Load the GLB in the application that will use it, including any extensions it depends on.
Record
Keep the source files, the tool and its version, the command used and both validation reports with the delivery.