Skip to content
BIM exchange guides

Exchange workflows

Convert glTF to GLB

Understand how .gltf and .glb differ, package a model as a GLB file with an established tool, and check that nothing was lost before delivery.

Reading time
3 min
For
Visualisation, web and real-time teams receiving 3D models
Learning objective
Package a glTF model as a single GLB file and confirm it matches the source.

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 table
AspectglTF (.gltf)GLB (.glb)
FilesJSON plus .bin and image files, or one JSON file with embedded dataUsually one binary file; external references are allowed
Readable in a text editorYes, the JSON partNo
Typical useInspection, editing, debugging and version controlDelivery, web viewers, AR and asset libraries
Main riskMissing or renamed companion filesHarder to inspect without a tool

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 table
ToolHow to convertNotes
glTF Transform (command line)gltf-transform copy model.gltf model.glbPreserves scene data; interleaves vertex data and removes Draco compression
gltf-pipeline (command line)gltf-pipeline -i model.gltf -o model.glb --keepUnusedElementsWithout that flag it removes unused nodes, meshes and materials
BlenderImport 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.

Verify the GLB

  1. Validate

    Run the glTF Validator on the GLB and compare its report with the source report. New errors or warnings point to the conversion.

  2. 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.

  3. Test in the receiver

    Load the GLB in the application that will use it, including any extensions it depends on.

  4. Record

    Keep the source files, the tool and its version, the command used and both validation reports with the delivery.

Related resources

Cookies on this site. We use cookies that are necessary for signing in and keeping the site secure. With your permission, first-party analytics helps us understand pages, traffic sources and devices. It records pseudonymous visits; IP addresses are kept for seven days. See our privacy policy.