.obj MIME type
Wavefront OBJ model3d models
model/objA plain-text 3D mesh format, with materials in a companion .mtl file (model/mtl).
| MIME type | model/obj |
|---|---|
| Extensions | .obj |
| Content-Type | model/obj |
| Compress in transit? | Yes — enable gzip or Brotli |
Good to know
- OBJ is text —
vlines for vertices,flines for faces — so it compresses very well in transit. - Windows compilers also use
.objfor object files. Those are binary COFF files with no relation to 3D models.
Serve .obj files with the right type
The response header to send:
Content-Type: model/obj
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/obj obj;
Apache (.htaccess or server config)
AddType model/obj .obj
Express
res.set("Content-Type", "model/obj");Python
import mimetypes
mimetypes.add_type("model/obj", ".obj")HTML file input
<input type="file" accept=".obj,model/obj">
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.obj | grep -i '^content-type:' file --mime-type file.obj
Frequently asked questions
What is the MIME type for .obj files?
model/obj.
What Content-Type header should a .obj file be served with?
Content-Type: model/obj. 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