Skip to content

GLB (.glb)

.glb file signature | application/octet-stream

GLB is the binary version of the glTF 2.0 3D asset format, standardized and maintained by the Khronos Group. It is used to package 3D models, scenes, materials, textures, and animations for web graphics, game engines, augmented reality, and virtual reality workflows. GLB files are generally safe, but as with other media assets, malformed files can expose vulnerabilities in importers or rendering libraries.

Safe

Magic Bytes

Offset 0
67 6C 54 46

Sources: Wikipedia

Extension

.glb

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .glb files in Python

Python
def is_glb(file_path: str) -> bool:
    """Check if file is a valid GLB by magic bytes."""
    signature = bytes([0x67, 0x6C, 0x54, 0x46])
    with open(file_path, "rb") as f:
        return f.read(4) == signature

How to validate .glb files in Node.js

Node.js
function isGLB(buffer: Buffer): boolean {
  const signature = Buffer.from([0x67, 0x6C, 0x54, 0x46]);
  return buffer.subarray(0, 4).equals(signature);
}

How to validate .glb files in Go

Go
func IsGLB(data []byte) bool {
    signature := []byte{0x67, 0x6C, 0x54, 0x46}
    if len(data) < 4 {
        return false
    }
    return bytes.Equal(data[:4], signature)
}

API Endpoint

GET /api/v1/glb
curl https://filesignature.org/api/v1/glb

See the full API documentation for all endpoints and parameters.

Related Formats

Frequently Asked Questions

What is a .glb file?

A .glb file is identified by the magic bytes 67 6C 54 46 at byte offset 0. GLB is the binary version of the glTF 2.0 3D asset format, standardized and maintained by the Khronos Group. It is used to package 3D models, scenes, materials, textures, and animations for web graphics, game engines, augmented reality, and virtual reality workflows. GLB files are generally safe, but as with other media assets, malformed files can expose vulnerabilities in importers or rendering libraries.

What are the magic bytes for .glb files?

The magic bytes for GLB files are 67 6C 54 46 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .glb file?

To validate a .glb file, read the first bytes of the file and compare them against the known magic bytes (67 6C 54 46) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .glb files?

There is no officially registered MIME type for .glb files. Systems typically use application/octet-stream as a generic fallback when handling this format.

Is it safe to open .glb files?

GLB (.glb) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.