Stereolithography
An STL file stores 3D surface geometry as a mesh of triangles — each defined by a normal vector and three vertices in 50 bytes — with no color, no material, no units, and no metadata. Invented in 1987 for the first commercial 3D printer, it remains the most widely supported format in additive manufacturing.
Conversion not yet available. STL mesh processing requires 3D geometry libraries not yet integrated into the browser-based pipeline.
Common questions
What is an STL file used for?
STL files store the surface geometry of three-dimensional objects as triangle meshes. They are the standard input format for 3D printers, used by every slicing application to generate the toolpath instructions that drive the printer. STL files are also used for rapid prototyping, computer-aided design exchange, and 3D visualization across engineering and manufacturing.
What is the difference between STL and 3MF?
3MF is the modern successor to STL, supporting color, texture, materials, print settings, and multiple objects in a single file. STL stores only bare triangle geometry with no metadata. 3MF was created in 2015 by a consortium that includes 3D Systems, the company that originated STL.
Why does my 3D print look faceted or rough?
STL approximates all curved surfaces using flat triangles in a process called tessellation. Low-resolution tessellation produces visible flat facets on curves and spheres. Increase the tessellation quality or reduce the chord deviation setting when exporting from your CAD software to produce a smoother mesh.
Does an STL file contain units like millimeters or inches?
No. STL files store dimensionless coordinates with no unit declaration. The same file could represent millimeters, inches, or meters depending on the source software. You must know the intended unit and configure your slicer or viewer accordingly to avoid scale errors.
What is the difference between ASCII and binary STL?
ASCII STL uses human-readable keywords and text numbers. Binary STL packs each triangle into exactly 50 bytes of IEEE 754 floats. Binary is roughly five times smaller and loads faster. About 95 percent of STL files in circulation are binary.
How do I fix a broken or non-manifold STL mesh?
Use a dedicated mesh repair tool such as Meshmixer, MeshLab, or Netfabb to detect and fix non-manifold edges, inverted normals, holes, and degenerate triangles. Most modern slicing applications also include built-in repair routines that attempt automatic fixes during the file import process.
Can STL files store color or texture information?
No. The STL specification provides no mechanism for color, texture, or material data. Some tools repurpose the 2-byte attribute field for per-triangle color, but this is non-standard and not widely supported. For colored 3D prints, use 3MF or OBJ with material files instead.
What makes .STL special
Three-dimensional printing begins with a triangle mesh, and for nearly four decades that mesh has overwhelmingly been stored in the STL format. Every desktop 3D printer, every industrial additive manufacturing system, and every slicing application on the market reads STL. The format's dominance is remarkable given its severe limitations — limitations that were deliberate design choices for the hardware constraints of 1987.
Continue reading — full technical deep dive
Chuck Hull and the birth of stereolithography
Charles W. Hull invented stereolithography in 1983 — a process that uses an ultraviolet laser to cure liquid photopolymer resin layer by layer, building a solid object from a digital model. Hull filed his patent (US4575330A) in 1984 and received it on March 11, 1986. He co-founded 3D Systems in 1986 to commercialize the technology. The first commercial 3D printer, the SLA-1, shipped in 1987.
The SLA-1 needed a file format to describe the geometry it would print. 3D Systems contracted the Albert Consulting Group to design one. The result was STL — a format so simple that the 1987 hardware could process it without difficulty. The name originally stood for "STereoLithography," though it is sometimes retroactively expanded as "Standard Tessellation Language" or "Standard Triangle Language."
Hull was inducted into the National Inventors Hall of Fame for his work on stereolithography. The format he commissioned has outlived every piece of hardware from that era.
ASCII versus binary: two variants
STL exists in two forms. The ASCII variant is human-readable, starting with the keyword solid followed by an optional name, and ending with endsolid. Each triangle is described by a facet normal line (the face normal vector), an outer loop block containing three vertex lines (the triangle's corners), and closing endloop and endfacet keywords. Numeric values use floating-point notation.
The binary variant is compact and dominant — roughly 95% of STL files in circulation are binary. It begins with an 80-byte free-form header (often containing the originating software name or left blank), followed by a 4-byte little-endian uint32 declaring the total triangle count. After that, each triangle occupies exactly 50 bytes.
The 50-byte triangle: anatomy of the binary format
Every triangle in a binary STL file occupies exactly 50 bytes in a fixed layout. The first 12 bytes encode the face normal vector as three IEEE 754 single-precision floats (nx, ny, nz) in little-endian byte order. The next 36 bytes encode three vertices, each as three floats (x, y, z) — vertex 1, vertex 2, vertex 3. The final 2 bytes are an "attribute byte count" field, a uint16 that is almost always zero.
This 50-byte structure is the fundamental unit of the format. The total binary file size is always exactly 80 (header) + 4 (triangle count) + N * 50 (triangles) bytes. This deterministic size formula is the primary method for identifying binary STL files, since the format has no magic bytes. PRONOM's entry for binary STL (fmt/865) explicitly states that no binary signature can be created under their identification model.
The attribute byte count field was intended for future extensions but was never formally specified. Some tools repurpose it for per-triangle color data (notably VisCAM and SolidView use it to encode RGB values), but this usage is non-standard and breaks interoperability.
The problem of no units
STL files contain no unit specification. The vertex coordinates are dimensionless floating-point numbers. The same file could represent an object measured in millimeters, inches, meters, or any other unit — there is no way to determine the intended scale from the file alone.
This is the single most common source of 3D printing failures for beginners. A user designs a 50mm part in a CAD tool that exports coordinates in millimeters. The slicer software assumes inches. The print comes out 25.4 times too large, or the slicer interprets a 50-inch object and reports that it exceeds the print bed. The fix requires the user to know the source unit and apply manual scaling — information that could have been embedded in the file but was never part of the specification.
No color, no material, no metadata
STL stores pure geometry: triangulated surfaces and nothing else. There is no mechanism for color, texture coordinates, material properties, part names, author metadata, version information, or measurement units. A complex assembly must be merged into a single triangle soup or split into separate STL files with naming conventions to identify parts.
This limitation was acceptable in 1987 when the SLA-1 printed in a single material (UV-cured resin) with no color capability. Modern multi-material, full-color 3D printers cannot use STL to describe their output. The format that launched additive manufacturing has become a bottleneck for its advancement.
Tessellation and the resolution tradeoff
STL approximates curved surfaces using flat triangles — a process called tessellation. A perfect sphere becomes a polyhedron; a smooth cylinder becomes a faceted prism. The accuracy of this approximation depends entirely on the number of triangles used.
Low-resolution tessellation produces visible facets on curved surfaces — the characteristic "rough" or "faceted" appearance that STL critics point to. High-resolution tessellation reduces visible facets but generates enormous files. A moderately detailed mechanical part might contain 100,000 triangles. An organic sculpted model can exceed 10 million. Since each triangle occupies 50 bytes in binary, a 10-million-triangle mesh produces a 500 MB file.
CAD software typically offers a tessellation tolerance setting when exporting STL, expressed as a chord deviation (maximum distance between the true curved surface and the flat triangle approximation). A deviation of 0.01mm produces near-invisible facets for most applications but generates proportionally more triangles.
STL repair: fixing broken meshes
Real-world STL files frequently contain geometric errors that prevent successful 3D printing. Common defects include non-manifold edges (where more than two triangles share an edge), inverted normals (triangles facing inward instead of outward), gaps or holes in the surface, self-intersecting geometry, and degenerate triangles (zero-area triangles where vertices are collinear).
These errors arise from tessellation algorithms, Boolean operations in CAD software, and the STL format's lack of topological information. Since STL stores each triangle independently with no adjacency data, vertices shared between triangles are duplicated — the same coordinate appears multiple times with no explicit link between them. Mesh repair tools must reconstruct topology from raw coordinates, identify and fix errors, and re-export a watertight mesh.
MeshLab, Meshmixer, Netfabb, and admesh are dedicated mesh repair tools. PrusaSlicer and Cura include built-in repair routines that attempt to fix common errors during the slicing process.
The slicing pipeline: STL to G-code to printer
STL files do not directly drive 3D printers. The printing pipeline has three stages. First, a CAD application or 3D scanner produces the digital model. Second, the model is exported as STL (tessellating any curved surfaces into triangles). Third, a slicer application reads the STL, intersects the triangle mesh with a series of horizontal planes at the configured layer height, generates toolpaths for each layer (infill patterns, perimeters, support structures), and outputs G-code — the machine instruction language that controls the printer's motors, heater, and extruder.
The slicer is where print settings live: layer height, print speed, temperature, infill density, support material, and bed adhesion. None of this information exists in the STL file. This separation means the same STL file can produce dramatically different prints depending on slicer settings — a feature for experienced users but a source of confusion for beginners who expect the file to encode print quality.
3MF: the intended successor
In 2015, the 3MF Consortium released the 3D Manufacturing Format (3MF) as a purpose-built replacement for STL. The consortium's founding members included Microsoft, HP, Shapeways, Autodesk, Dassault Systemes, and — notably — 3D Systems itself, the company that created STL. By joining the consortium, 3D Systems effectively acknowledged that its own 1987 format was no longer adequate.
3MF is a ZIP-based package containing XML files that describe geometry, color, material, texture, print settings, and metadata. It supports multiple objects in a single file, per-triangle color, lattice structures, and digital signatures. The 3MF specification is maintained as an open standard.
Adoption is growing — PrusaSlicer, Cura, Bambu Studio, and Windows 3D Builder all support 3MF — but STL's installed base is massive. Thingiverse, Printables, and other model repositories still host predominantly STL files. The transition from STL to 3MF mirrors the slow migration from other entrenched formats: technically superior but fighting decades of inertia.
.STL compared to alternatives
| Formats | Criteria | Winner |
|---|---|---|
| .STL vs .3MF | Feature richness 3MF supports color, texture, materials, print settings, multiple objects, and metadata in a single ZIP package. STL stores only triangle geometry with no color, material, units, or metadata of any kind. | 3MF wins |
| .STL vs .3MF | Universal support Every 3D printer, slicer, CAD tool, and model repository supports STL. 3MF support is growing but not yet universal — some older slicers and niche CAD tools still lack 3MF import. | STL wins |
| .STL vs .OBJ | Texture and material support OBJ supports texture coordinates, material libraries (.mtl files), and vertex colors. STL has no mechanism for any visual attribute beyond raw geometry — every surface is colorless and textureless. | OBJ wins |
| .STL vs .OBJ | 3D printing ecosystem STL is the native format of the 3D printing pipeline — every slicer accepts it directly. OBJ is used primarily in computer graphics, animation, and game development rather than additive manufacturing. | STL wins |
| .STL vs .STEP | Geometric precision STEP stores exact mathematical surface definitions (NURBS, B-splines) with infinite resolution. STL approximates all surfaces with flat triangles, losing curvature information and introducing visible facets. | STEP wins |
| .STL vs .STEP | Simplicity and parsing speed STL's fixed 50-byte triangle structure is trivial to parse in any language. STEP is a complex ISO 10303 standard with nested entity references, requiring a full STEP parser to extract geometry. | STL wins |
Technical reference
- MIME Type
model/stl- Developer
- 3D Systems
- Year Introduced
- 1987
- Open Standard
- Yes
Binary Structure
Binary STL begins with an 80-byte free-form ASCII header (often blank or containing the exporting software name), followed by a 4-byte little-endian uint32 declaring the total number of triangles. Each triangle occupies exactly 50 bytes: 12 bytes for the face normal vector (3 x float32), 36 bytes for three vertices (9 x float32), and 2 bytes for an attribute byte count (uint16, usually zero). Total file size is deterministically 80 + 4 + (N x 50) bytes. ASCII STL starts with 'solid [name]' and ends with 'endsolid [name]', with each triangle described by facet/vertex/endloop/endfacet keywords. Binary STL has no magic bytes — PRONOM cannot create an identification signature for it. The file-size formula is the primary identification heuristic. ASCII STL starts with 'solid' (hex 73 6F 6C 69 64) but some binary files also begin with 'solid' in their header, causing misidentification.
| Offset | Length | Field | Example | Description |
|---|---|---|---|---|
0x00 | 80 bytes | Header | (varies) | Free-form text, often blank or software name |
0x50 | 4 bytes | Triangle count | 01 00 00 00 | uint32 LE — total triangles in mesh |
0x54 | 12 bytes | Normal vector | 00 00 00 00 00 00 00 00 00 00 80 3F | 3x float32 — triangle face normal (nx, ny, nz) |
0x60 | 12 bytes | Vertex 1 | 00 00 80 3F 00 00 00 00 00 00 00 00 | 3x float32 — first vertex (x, y, z) |
0x6C | 12 bytes | Vertex 2 | ... | 3x float32 — second vertex |
0x78 | 12 bytes | Vertex 3 | ... | 3x float32 — third vertex |
0x84 | 2 bytes | Attribute byte count | 00 00 | Usually zero; some tools store color here |
Conversion not yet available. STL mesh processing requires 3D geometry libraries not yet integrated into the browser-based pipeline.
Attack Vectors
- Malformed triangle count overflow
- Oversized mesh memory exhaustion
Mitigation: FileDex does not parse or render STL mesh data. This is a reference page providing format documentation. STL parsers should validate the declared triangle count against actual file size (expected = 80 + 4 + N * 50) before allocating memory.
- Specification The StL Format — fabbers.com (de facto specification reference)
- Registry STL (STereoLithography) File Format Family — Library of Congress Format Description (fdd000504)
- Registry STL Binary (fmt/865) — The National Archives PRONOM Registry
- Registry IANA Media Type: model/stl
- History Chuck Hull — National Inventors Hall of Fame
- History STL (file format) — Wikipedia