# .glb MIME Type: model/gltf-binary

> Binary glTF: a 3D scene with its meshes, materials and textures packed into one file. The web's default 3D format.

- MIME type: `model/gltf-binary`
- Extensions: .glb
- Content-Type header: `model/gltf-binary`
- Compress in transit: no (already compressed)
- File signature: `67 6C 54 46`

## Good to know

- three.js's GLTFLoader, Babylon.js and the `<model-viewer>` element all load it without checking the type. But most servers have no `.glb` mapping and send `application/octet-stream`; set it so CDNs label and cache the file correctly.
- Loading a model from another origin needs CORS headers, like any `fetch`.

## Server configuration

### nginx (inside the types block in mime.types)

```
model/gltf-binary glb;
```

### Apache (.htaccess or server config)

```
AddType model/gltf-binary .glb
```

### Express

```
res.set("Content-Type", "model/gltf-binary");
```

### Python

```
import mimetypes

mimetypes.add_type("model/gltf-binary", ".glb")
```

### HTML file input

```
<input type="file" accept=".glb,model/gltf-binary">
```

## FAQ

### What is the MIME type for .glb files?

`model/gltf-binary`.

### What Content-Type header should a .glb file be served with?

`Content-Type: model/gltf-binary`. It's already compressed, so servers shouldn't gzip it.

### How can I tell if a file is really a .glb?

Check its bytes rather than the extension: GLB files start with `67 6C 54 46` (`glTF`). On the command line, `file --mime-type name.glb` does this for you.

## Related types

- [.gltf — model/gltf+json](https://www.devkult.com/mime/gltf.md)
- [.usdz — model/vnd.usdz+zip](https://www.devkult.com/mime/usdz.md)
- [.obj — model/obj](https://www.devkult.com/mime/obj.md)
- [.stl — model/stl](https://www.devkult.com/mime/stl.md)

Open the interactive page: https://www.devkult.com/mime/glb