file in abyss
Back to formats

3D

GLB Binary glTF

Binary glTF is a 3d format commonly identified by .glb. Use the listed signatures, MIME types, and structure notes to validate files beyond the extension.

Extensions .glb
MIME model/gltf-binary, model/gltf+binary

Magic numbers

Analyze your file
offset 0 Binary glTF leading signature
67 6C 54 46
glTF

Structure

  1. Magic
  2. Version
  3. Length
  4. JSON chunk
  5. BIN chunk

Caveats

  • Do not trust the extension alone. Check the MIME type, the first bytes such as 67 6C 54 46, and format-specific structure when possible.
  • Container formats and damaged files can share the same opening bytes, so deeper validation may be required for production upload, preview, or conversion flows.

Detection example

SIGNATURE = bytes.fromhex("676c5446")
OFFSET = 0

def is_glb(path: str) -> bool:
    with open(path, "rb") as f:
        f.seek(OFFSET)
        head = f.read(len(SIGNATURE))
    return head == SIGNATURE

Practical usage

Use cases

Binary glTF is used in 3D viewers, asset pipelines, model conversion, avatar loading, and scene validation. Containers, extensions, binary chunks, and texture references all affect implementation behavior.

Common detection mistakes

  • The .glb extension alone does not prove the file contents. Upload and conversion flows should combine extension, MIME type, leading bytes, and format-specific structure checks.
  • Binary glTF can start with signatures such as 67 6C 54 46, but related containers and damaged files may require additional validation.

Security notes

Untrusted input is not safe just because the format was detected. Account for parser exceptions, large files, unexpected encodings, and external references.

Using samples

11 samples help test viewer loading, extension detection, and load time across file sizes.

Sample files

11 / 11 files
Sample Traits Size Source / license / SHA-256
3D

Box Vertex Colors GLB

Box Vertex Colors GLB is a Binary glTF sample based on Khronos glTF Sample Assets. It can be used to test downloads, parsers, previews, and file type detection.

01-box-vertex-colors.glb
Type Sample
1.9 KB
SHA-256 9c48227f33b0ba2fbcf23b98ebf60d1c8ae0c6e6c5281e0aa3cc58affee10382
Download
3D

Animated Colors Cube GLB

Animated Colors Cube GLB is a Binary glTF sample based on Khronos glTF Sample Assets. It can be used to test downloads, parsers, previews, and file type detection.

02-animated-colors-cube.glb
Type Sample
15 KB
SHA-256 995bb9db5bd011b64bc9fc2235c60e5455e2931e509db5e715b4d20afc5ba71e
Download
3D

Animated Morph Cube GLB

Animated Morph Cube GLB is a Binary glTF sample based on Khronos glTF Sample Assets. It can be used to test downloads, parsers, previews, and file type detection.

03-animated-morph-cube.glb
Type Sample
6.6 KB
SHA-256 214ee56160a50dbf22543a1d66dbf860986e87f0efac3d89feac1359d0e6aeab
Download
3D

Simple Instancing GLB

Simple Instancing GLB is a Binary glTF sample based on Khronos glTF Sample Assets. It can be used to test downloads, parsers, previews, and file type detection.

04-simple-instancing.glb
Type Sample
7.2 KB
SHA-256 1c9425627481346a8c226118f7000db7cd7f80198e9f54331f8b664d16726f3f
Download
3D

Metal Rough Spheres GLB

Metal Rough Spheres GLB is a Binary glTF sample based on Khronos glTF Sample Assets. It can be used to test downloads, parsers, previews, and file type detection.

05-metal-rough-spheres.glb
Type Sample
284 KB
SHA-256 5e677f260ec0f366967a6e9545de2f3dab2a160e307b9bcb9d050cd2028f63f8
Download
3D

Glass Vase Flowers GLB

Glass Vase Flowers GLB is a Binary glTF sample based on Khronos glTF Sample Assets. It can be used to test downloads, parsers, previews, and file type detection.

06-glass-vase-flowers.glb
Type Sample
Large file
1.74 MB
SHA-256 430c9937664cfc74299205dcc388e4269bb688817f3d3866ef35aab71e93b852
Download
3D

Clearcoat Wicker GLB

Clearcoat Wicker GLB is a Binary glTF sample based on Khronos glTF Sample Assets. It can be used to test downloads, parsers, previews, and file type detection.

07-clearcoat-wicker.glb
Type Sample
Large file
1.24 MB
SHA-256 f162b0cd7f8e6b7cef211eec57762165a78039676b8592ce1f965e2ddb34e843
Download
3D

Avocado GLB

Avocado GLB is a Binary glTF sample based on Khronos glTF Sample Assets. It can be used to test downloads, parsers, previews, and file type detection.

08-avocado.glb
Type Sample
Large file
7.73 MB
SHA-256 ccc9c3ce56423720b09399c2351537207cd5a65f859f9e6e2f30922762f3abd4
Download
3D

Toy Car GLB

Toy Car GLB is a Binary glTF sample based on Khronos glTF Sample Assets. It can be used to test downloads, parsers, previews, and file type detection.

09-toy-car.glb
Type Sample
Large file
5.17 MB
SHA-256 01a60862de55cd4b9f3acfab0b0def86451800f9c42467fcd61052c16cb9838c
Download
3D

Water Bottle GLB

Water Bottle GLB is a Binary glTF sample based on Khronos glTF Sample Assets. It can be used to test downloads, parsers, previews, and file type detection.

10-water-bottle.glb
Type Sample
Large file
8.55 MB
SHA-256 b337e526fd6a162013c2984aeec163f5fbb4f717252724dfc3f3458bd51df94b
Download
3D

Box GLB

Box GLB is a Binary glTF sample based on Khronos glTF Sample Assets. It can be used to test downloads, parsers, previews, and file type detection.

box.glb
Type Sample
1.6 KB
SHA-256 ed52f7192b8311d700ac0ce80644e3852cd01537e4d62241b9acba023da3d54e
Download

Frequently asked questions

What is the magic number (file signature) of Binary glTF?

Binary glTF files begin with the byte signature 67 6C 54 46 ("glTF"). Detect the format by reading these leading bytes rather than trusting the file extension alone.

What is the MIME type of Binary glTF?

The MIME type for Binary glTF is model/gltf-binary, model/gltf+binary.

What file extension does Binary glTF use?

Binary glTF files use the .glb extension. The extension is a convention only and does not guarantee the file contents, so combine it with signature and structure checks.

Related formats