.gltf MIME type
glTF3d models
model/gltf+jsonglTF scenes as JSON, with geometry in separate .bin buffers and textures as image files.
| MIME type | model/gltf+json |
|---|---|
| Extensions | .gltf |
| Content-Type | model/gltf+json |
| Compress in transit? | Yes — enable gzip or Brotli |
Good to know
- A
.gltfreferences its other files by relative URL. Serve the.binbuffers and textures alongside it — or convert to .glb, which bundles everything. - The
.binbuffers are plain binary data:application/octet-stream.
Serve .gltf files with the right type
The response header to send:
Content-Type: model/gltf+json
Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:
nginx (inside the types block in mime.types)
model/gltf+json gltf;
Apache (.htaccess or server config)
AddType model/gltf+json .gltf
Express
res.set("Content-Type", "model/gltf+json");Python
import mimetypes
mimetypes.add_type("model/gltf+json", ".gltf")HTML file input
<input type="file" accept=".gltf,model/gltf+json">
Check it
See what a server sends for a file, and what type a local file really is by its contents:
curl -sI https://example.com/file.gltf | grep -i '^content-type:' file --mime-type file.gltf
Frequently asked questions
What is the MIME type for .gltf files?
model/gltf+json.
What Content-Type header should a .gltf file be served with?
Content-Type: model/gltf+json. It compresses well, so let the server apply gzip or Brotli.
Related types
Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options