file in abyss
Back to formats

3D

GLTF glTF JSON

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

Extensions .gltf
MIME model/gltf+json

Magic numbers

Analyze your file
offset 0 glTF JSON leading signature
7B
{

Structure

  1. asset
  2. scenes
  3. nodes
  4. meshes
  5. materials
  6. buffers
  7. bufferViews
  8. accessors

Caveats

  • Do not trust the extension alone. Check the MIME type, the first bytes such as 7B, 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("7b")
OFFSET = 0

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

Practical usage

Use cases

glTF JSON 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 .gltf extension alone does not prove the file contents. Upload and conversion flows should combine extension, MIME type, leading bytes, and format-specific structure checks.
  • glTF JSON can start with signatures such as 7B, 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 glTF

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

01-box-vertex-colors.gltf
Type Sample
3.0 KB
SHA-256 cb6215d4ef8df16a7c53205fd275dcea32dda247c6c1af60187436cadb98c28a
Download
3D

Animated Colors Cube glTF

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

02-animated-colors-cube.gltf
Type Sample
22 KB
SHA-256 54e837a6976b351f4772fc57076a1edf549c3ab99c8bffb210a1c0b1c7e8fd93
Download
3D

Animated Morph Cube glTF

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

03-animated-morph-cube.gltf
Type Sample
10 KB
SHA-256 90af46348798c241bd74a0d880800f252c0b7afa6be734978c40e30a204647d8
Download
3D

Simple Instancing glTF

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

04-simple-instancing.gltf
Type Sample
10 KB
SHA-256 250b8242f684d8b743b18e35a0f59234f4b7308bbe514d14ab10ff702d9600e6
Download
3D

Metal Rough Spheres glTF

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

05-metal-rough-spheres.gltf
Type Sample
405 KB
SHA-256 cbb92e989cdfa3944f5c3c9c266746199492a0f0ca77b694d3859afea5123216
Download
3D

Glass Vase Flowers glTF

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

06-glass-vase-flowers.gltf
Type Sample
Large file
2.32 MB
SHA-256 8a1ddbf4a06eef0b18da3ec1980626b7d35e5d31edc9fe3d73781891b0f81a7e
Download
3D

Clearcoat Wicker glTF

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

07-clearcoat-wicker.gltf
Type Sample
Large file
1.65 MB
SHA-256 f522f62c246575fbedc7bf5b1ae81fad75e4f175745e899017a7021c8db6c72d
Download
3D

Avocado glTF

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

08-avocado.gltf
Type Sample
Large file
10.31 MB
SHA-256 39a339e95a6840e50b9d758d64e24892f02ef9e6ce9a61973c2b509a3f9834c0
Download
3D

Toy Car glTF

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

09-toy-car.gltf
Type Sample
Large file
6.90 MB
SHA-256 6d6eb3eb045bd15adf10dd60b6f79667743eb0683b327822d395e43c90bcd1c7
Download
3D

Water Bottle glTF

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

10-water-bottle.gltf
Type Sample
Large file
11.40 MB
SHA-256 598ad629764421c72557f5795c2de9ae0f6c2932cbd7390c685ffbaf583d3b98
Download
3D

Box glTF

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

box.gltf
Type Sample
2.8 KB
SHA-256 2803457f6adb3d3326a9ff4ac1cf3cdd4106fb6c78f18312c10da6bba14b7d77
Download

Frequently asked questions

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

glTF JSON files begin with the byte signature 7B ("{"). Detect the format by reading these leading bytes rather than trusting the file extension alone.

What is the MIME type of glTF JSON?

The MIME type for glTF JSON is model/gltf+json.

What file extension does glTF JSON use?

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

Related formats