What is a GLB file? (and how it differs from glTF)
Updated · 5 min read
A GLB file is a 3D model saved in the binary form of glTF 2.0, the open, royalty-free 3D format from the Khronos Group. One .glb file can hold the whole model: meshes, UVs, PBR materials, texture images and animations. It is the usual format for 3D on the web, in AR and in AI 3D tools.
Below: what is inside a GLB, how the file is put together byte by byte, how it compares with a .gltf file, and how to open, view and edit one.
Try it on your own model
Upload a GLB, OBJ, FBX, STL or PLY file (or pick a sample), describe the look, and let AI paint it from every side.
Open the AI 3D Texturing StudioWhat a GLB file contains
A GLB stores the same things as any glTF 2.0 asset. Not every file uses all of them:
- Meshes: vertex positions, normals, tangents, UV coordinates and optional vertex colours.
- Materials: glTF’s physically based metallic-roughness model, with slots for base colour, metallic-roughness, normal, occlusion and emissive textures. See PBR maps explained for what each one does.
- Textures: in the core spec the images are PNG or JPEG; other formats (such as KTX2) come through extensions.
- A scene: the node hierarchy, with each part’s position, rotation and scale, plus optional cameras.
- Animation: skins (skeletons), keyframe animations and morph targets.
The spec also fixes the space: distances are in metres, and +Y is up. That is why a GLB usually arrives the right size and the right way up, while formats without units often do not.
How a GLB file is built
GLB is a small container around glTF’s JSON and binary data. The spec defines it exactly, and it is little-endian:
| Part | Size | What it holds |
|---|---|---|
| Header | 12 bytes | The magic number 0x46546C67 (the ASCII text "glTF"), the container version (2) and the total file length |
| JSON chunk | Varies | The scene description: nodes, meshes, materials, textures, animations, and where each piece of data sits. Always present and always first |
| BIN chunk | Varies | Raw binary data: vertex buffers, indices, animation keys and, usually, the texture images. Zero or one per file |
Each chunk starts with its length and its type, and every chunk is padded to a 4-byte boundary. Because the binary data is stored as raw bytes, a GLB avoids the roughly 33% size overhead that comes from writing the same data into a .gltf as base64 text.
A quick way to check a file: open it in a hex viewer. A real GLB starts with the four characters glTF.
GLB vs glTF
GLB and glTF are not two different formats. They are two ways to package the same glTF 2.0 data, so a model looks the same in either.
| GLB (.glb) | glTF (.gltf) | |
|---|---|---|
| Encoding | Binary | JSON text |
| Files | One file | Usually a .gltf plus a .bin and separate images; or one .gltf with everything inside as base64 text |
| Textures | Usually packed inside | Separate image files, or base64 inside the JSON |
| Open in a text editor | No | Yes, the JSON is readable and easy to diff |
| Risk of missing files | Low, it is self-contained | Higher, the .bin and images must travel with it |
| Size | Compact | Same as GLB when separate; about a third larger for base64 data when embedded |
| Media type | model/gltf-binary | model/gltf+json |
| Best for | Sharing, web, AR, game engines, downloads | Editing by hand, debugging, pipelines that swap textures |
Converting between them only repackages the data, so nothing about the model is lost. Use GLB when you send or publish a model, and glTF when you want to read or edit the JSON. Our GLB to glTF and glTF to GLB converters switch between the two.
Why some GLB files are much smaller
Two GLBs of the same model can differ a lot in size. The container is rarely the reason; compression is:
- Geometry compression: the KHR_draco_mesh_compression and EXT_meshopt_compression extensions shrink the mesh data.
- Texture compression: the KHR_texture_basisu extension stores textures as KTX2, which stays compressed on the GPU.
- Texture size: a 4096 px texture has four times the pixels of a 2048 px one, and textures are often most of a GLB’s weight.
A viewer has to support an extension to open a file that uses it. If a compressed GLB will not load somewhere, that is usually why.
How to open a GLB file
- In a browser: drop it into our free GLB viewer. The file is read on your device, not uploaded.
- Blender: File > Import > glTF 2.0 (.glb/.gltf). Blender’s exporter writes GLB the same way.
- Godot: imports glTF and GLB natively, and its docs recommend glTF 2.0.
- Unity: through a glTF importer package such as Unity glTFast.
- On the web: three.js, Babylon.js and the model-viewer web component load GLB directly.
iPhone AR Quick Look uses USDZ rather than GLB, so convert the model first with GLB to USDZ. For 3D printing, slicers want STL or 3MF: GLB to STL does that, but note STL drops all colour.
Why does my GLB look grey?
A GLB can carry textures, but it does not have to. A file is still a valid GLB if its material is one flat colour, if it uses vertex colours instead of an image, or if it has no material at all. Many CAD exports and many AI-generated meshes arrive this way.
To give a grey GLB a real texture, the model needs UVs and a base colour image. The AI 3D Texturing Studio does both in the browser: upload the GLB, describe the look, press Auto texture, and download a GLB with the texture packed inside. If your GLB already has good UVs, Keep my UVs paints straight into them and keeps the file’s own material.
Texture a GLB in your browser
Upload a GLB (or a single-file .gltf), let AI paint it, and download one GLB with the texture inside.
Open the studioQuestions
Is GLB the same as glTF?
It is the same format in a different package. A .glb is binary and holds everything in one file; a .gltf is JSON text that usually points to a separate .bin and image files.
Does a GLB file include textures?
It can, and an exported textured model usually does: the images sit in the file’s binary chunk. A GLB with only flat colours or vertex colours is also valid, and it will look plain in a viewer.
Can a GLB file be animated?
Yes. glTF 2.0 supports skeletons (skins), keyframe animation and morph targets, and a GLB carries them in the same single file.
Is GLB free to use?
Yes. glTF 2.0 is an open, royalty-free standard maintained by the Khronos Group, and its specification is public.
Can I 3D print a GLB file?
Most slicers do not open GLB. Convert it to STL (single colour) or 3MF first, and make sure the mesh is closed (watertight).
Ready to texture something?
Upload a GLB, OBJ, FBX, STL or PLY file (or pick a sample), describe the look, and let AI paint it from every side.
Start texturingStep-by-step tutorials
Keep reading
PBR maps explained: albedo, normal, roughness, metallic and AO
PBR maps explained for beginners: what albedo, normal, roughness, metallic and ambient occlusion maps do, how a GLB stores them, and how AI textures fit in.
What is a normal map?
What a normal map is, how its RGB channels store surface direction, why it looks blue, tangent vs object space, OpenGL vs DirectX, and bump vs displacement.
STL vs OBJ: what is the difference, and which should you use?
STL vs OBJ compared: what each file stores, colour, textures and UVs, triangles vs polygons, units, which to use for 3D printing, and what converting changes.
UV unwrapping explained (and why it matters for AI texturing)
UV unwrapping explained simply: what UVs are, why seams and islands exist, what texel density means, and what UV problems do to AI texturing, with fixes.
Sources
Checked 2026-10-17. Other tools change their features and prices often, so check their own pages too.
- Khronos Group, glTF 2.0 specification (GLB file format, media types, units, images)
- glTF 2.0 specification source on GitHub
- Khronos Group: glTF overview
- IANA media type registration: model/gltf-binary
- Khronos: KHR_draco_mesh_compression extension
- Khronos: KHR_texture_basisu extension (KTX2 textures)
- Blender Manual 4.1: glTF 2.0 import and export
- Godot docs: Available 3D formats
- Unity glTFast documentation