devkult_
tools30converters34
home/mime/.stl

.stl MIME type

STL model3d models

model/stl

Triangle meshes for 3D printing and CAD.

MIME typemodel/stl
Extensions.stl
Also seen asapplication/sla
Content-Typemodel/stl
Compress in transit?Yes — enable gzip or Brotli

Good to know

  • Apache's stock mime.types maps .stl to application/vnd.ms-pki.stl — a Windows certificate trust list. Override it if you serve 3D files.
  • Binary STL has no signature: an 80-byte header, then a triangle count. ASCII STL starts with solid, but so do some binary files, so check that the size is 84 + 50 × the triangle count.
  • STL stores geometry only — no units, colors or textures. Use 3MF or glTF when those matter.

Serve .stl files with the right type

The response header to send:

Content-Type: model/stl

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/stl stl;
Apache (.htaccess or server config)
AddType model/stl .stl
Express
res.set("Content-Type", "model/stl");
Python
import mimetypes

mimetypes.add_type("model/stl", ".stl")
HTML file input
<input type="file" accept=".stl,model/stl">

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.stl | grep -i '^content-type:'
file --mime-type file.stl

Frequently asked questions

What is the MIME type for .stl files?

model/stl. You may also see application/sla, but model/stl is the one to send.

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

Content-Type: model/stl. 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