STL files, and how to convert them
STL is the file every 3D printer expects and almost every CAD program can write. It is also the most limited format on this site: it holds triangles and nothing else. Knowing exactly what it drops is the difference between a print that works and an afternoon wasted.
.stl · model/stl
STL conversions that work today
Convert a STL file into something else
Make a STL file from something else
- OBJ to STL.obj → .stl
- PLY to STL.ply → .stl
- GLB to STL.glb → .stl
- 3MF to STL.3mf → .stl
- FBX to STL.fbx → .stl
- SVG to STL.svg → .stl
- STEP to STL.step → .stl
- IGES to STL.iges → .stl
- BREP to STL.brep → .stl
- G-code to STL.gcode → .stl
- JPEG to STL.jpg → .stl
- PNG to STL.png → .stl
- DXF to STL.dxf → .stl
- ZIP to STL.zip → .stl
- Rhino 3DM to STL.3dm → .stl
Things to do with a STL file
- Gridfinity generatorBins and baseplates, any size, built in the browser
- Turn text into an STLType a word and print it, without drawing anything
- Turn an image into an STLA photo or a logo, turned into something you can print
- Lithophane generatorA photo printed as thickness, lit from behind
- Repair an STL that will not sliceClose the holes and separate the bad edges so a slicer accepts it
- Reduce the size of an STL fileFewer triangles, the same shape, a much smaller file
- Check whether an STL is ready to printFind out what is wrong with a model before you print it
- 3D printing cost calculatorThe real cost of a print, and whether to print it or order it
STL guides
What an STL file actually contains
An STL file is a list of triangles. Each one is stored as three corner points and a direction, and that is the whole format. There is no header describing the model, no list of parts, no colour, and no statement of what one unit means.
The binary form writes 50 bytes per triangle after a short header, so the file size tells you the triangle count exactly: subtract 84 bytes and divide by 50. The text form writes the same information as readable words and comes out about five times larger for no benefit. Use binary unless something specifically demands text.
Nothing in the file records which triangles are joined to which. A cube is thirty-six separate corner points that happen to sit on top of each other in pairs. Every program that opens an STL has to work the connections out again, which is why an STL opened in Blender behaves so badly until the points are welded.
The unit problem, which catches everyone once
The format was designed in 1987 for one machine, and that machine worked in one unit, so nobody wrote the unit down. Thirty-odd years later a cube ten units wide might be ten millimetres, ten centimetres or ten inches, and the file genuinely does not say.
In practice slicers assume millimetres. CAD programs export in whatever the model used. This is why a part from a metric CAD file lands correctly and a part from an imperial one arrives twenty-five times too small. Every converter on this site shows the measured width, depth and height beside the model so you can see the mistake before you download rather than after you print.
When to use something else
Use 3MF when the printer or slicer accepts it. It records the units, keeps several objects apart, carries colour, and is usually a smaller file. Every current slicer reads it, and Prusa, Orca and Bambu all use it as their own project format.
Use OBJ or GLB when the model is going into a modelling program or a game engine, because both keep materials and texture coordinates that STL has to throw away.
Keep STL when you are handing a file to a print service, an older machine, or anyone whose software you cannot ask about. It is the format nothing refuses.
What STL cannot store
- Units — the numbers are bare, and every reader guesses
- Colour, materials or textures of any kind
- Separate objects — several parts become one undivided body
- Curves — everything was flattened to triangles when the file was written
- Names, metadata, or anything about where the model came from
STL in detail
| Property | STL.stl |
|---|---|
| File contents | Binary or plain text. Binary is an 80-byte header, a triangle count, then 50 bytes per triangle. |
| Geometry | Triangles only. Curves are approximated when the file is made, and cannot be recovered. |
| Units | None. The file stores bare numbers, and every reader has to guess what they mean. |
| Colour and texture | None. There is no place in the format for a colour, a material or a texture. |
| Separate objects | One body. Several parts written into one STL become one undivided lump of triangles. |
| Published by | 3D Systems, 1987, for the first stereolithography machines. |
| Written by | Every CAD program and every slicer, as the common denominator. |
Questions
- Is binary or ASCII STL better?
- Binary, almost always. It is about five times smaller and every slicer and CAD program reads it. ASCII STL is plain text you can open in an editor, which is occasionally useful for debugging and never worth the size otherwise.
- Why does my STL open at the wrong size?
- Because the file does not record its units and the program that opened it guessed differently from the program that wrote it. Set the input unit on any converter here to what the file actually used, set the output to millimetres, and check the measurements shown beside the model.
- Can an STL file store colour?
- No. Some programs have used the unused bytes in each triangle record to smuggle a colour in, but nothing reads it reliably and it is not part of the format. If you need colour, convert to 3MF, OBJ or GLB instead.
- Can I get a CAD model back out of an STL?
- Not properly. An STL has already been flattened to triangles, and the curves and features that produced them are gone. You can wrap the triangles in a solid body, which some CAD programs accept, but you do not get editable features back.