3D file formats for printing: STL, 3MF, OBJ, STEP and GLB compared
Published · By STL Viewer Online
A 3D printer needs a mesh. A CAD program stores exact geometry. A web page wants materials and small files. A scanner produces coloured points. No single file format serves all of those, which is why a model tends to exist as three or four files by the time it is printed. This guide covers the five formats that matter for printing and the conversions between them, with enough detail to pick the right one and to know what you gave up when you converted.
What each format stores
| Format | Geometry | Units | Colour / material | Multiple parts | Encoding | Typical source |
|---|---|---|---|---|---|---|
| STL | Triangles only, no shared vertices | None (assumed mm) | No | No (shells merged) | Binary or ASCII | Every CAD and mesh tool |
| 3MF | Indexed triangles | Declared (mm default) | Per part and per triangle; materials | Yes, with placement | Zipped XML | Slicers, modern CAD |
| OBJ | Indexed polygons (tris, quads, n-gons) | None | Via separate .mtl and image files | Yes, as groups | Text | Blender, Maya, ZBrush, scanners |
| STEP | Exact surfaces and solids (B-rep) | Declared | Colour per face in AP214/AP242 | Yes, assemblies | Text | CAD (Fusion, SolidWorks, Onshape, FreeCAD) |
| GLB | Indexed triangles | Metres by spec | Full PBR materials, embedded textures | Yes, scene graph | Binary (JSON + buffer) | Web, AR, game engines |
Two others are worth knowing. PLY is what scanners write: indexed triangles or bare points, with a colour per vertex, in text or binary. AMF was the intended successor to STL in 2011 and stores much of what 3MF does, but 3MF won; you will rarely meet an AMF outside old repositories.
STL: the format the printer speaks
Every slicer opens STL and every 3D program writes it. It stores triangles and nothing else, which makes it simple to write and impossible to get wrong in interesting ways. It is the right choice when you want the widest possible compatibility, when the model is one part in one material, and when you are archiving a shape for printing later. Its limits are the reason the other formats exist: no units, no colour, no parts, no shared vertices, so files are large. The STL format guide has the byte-level details.
3MF: the format the slicer prefers
3MF was designed in 2015 by a consortium of printer and software companies to replace STL for printing. It is a zip archive with an XML model inside. It declares its units, so a part is never 25.4 times too small. It stores several objects with their positions on the plate. It can colour a part or an individual triangle, and it can carry materials, which is what multi-material and multi-colour printing needs. Slicers use it as their project format, so a 3MF saved from Bambu Studio or PrusaSlicer also contains print settings, support paint and plate layout in extra files. That makes 3MF the right choice for sharing a print with someone who uses the same slicer, and for anything multi-colour. Its only drawback is that a few older tools do not read it.
OBJ: the format modelling tools agree on
OBJ is a 1990s text format from Wavefront that survives because it is simple and universal among modelling and rendering programs. It stores vertices once and faces as references to them, allows quads and larger polygons, and groups faces into named objects. Colour and texture live outside the file, in an .mtl file and image files, which is why an OBJ downloaded alone is grey. Use OBJ when you are moving a mesh between Blender, Maya, ZBrush, Unity or a scanner app; convert to STL or 3MF for slicing. No units, same as STL, and the same scale traps. The OBJ viewer shows what the file holds.
STEP: the format that keeps the real geometry
STEP (ISO 10303, usually .step or .stp) is not a mesh. It describes the exact surfaces and solids of a CAD model: a cylinder is a cylinder with a radius, not four hundred triangles. That means a STEP file can be re-opened in any CAD program and edited, measured exactly, and re-exported at any tolerance. It is the right format for sending a design to someone who will modify it, for archiving your own designs, and for machining. It is the wrong format for a slicer, which needs triangles and will either refuse it or tessellate it internally (PrusaSlicer and Bambu Studio can import STEP directly, with their own tolerance). This site does not read STEP yet; export STL or 3MF from your CAD tool.
GLB: the format the web wants
GLB is glTF 2.0 in one binary file: a scene of meshes with full physically based materials and the texture images embedded. It is what browsers, AR on phones and game engines load, and it is small because vertices are indexed and the buffer is binary. It is the right format for showing a model on a web page or in AR, and the wrong format for printing, since slicers do not read it and its units are metres. The GLB viewer and the STL to GLB converter cover both directions.
Which to use when
- Sending a single-material part to any slicer: STL, binary.
- Multi-colour or multi-material print, or a whole plate with settings: 3MF.
- Uploading to a sharing site: STL for reach, 3MF alongside if the model uses colours or has several parts.
- Sending a design to someone who will edit it in CAD: STEP, always. Never STL.
- Moving a sculpt or scan between mesh tools: OBJ (or PLY if it is a coloured scan).
- Showing a model on a website, in AR or in a game: GLB.
- Archiving your own design: the native CAD file plus STEP. Add an STL only for convenience.
What conversions lose
| Conversion | Kept | Lost | Watch out for |
|---|---|---|---|
| STEP to STL / 3MF | Shape, at the chosen tolerance | Exact geometry, editability, feature history | Tolerance too coarse shows facets; too fine bloats the file |
| STL to 3MF | Everything | Nothing | Units are assumed mm and written as such |
| 3MF to STL | Shape, placement applied | Colours, materials, part identity, settings | Several parts become one shell soup |
| OBJ to STL | Shape, triangulated | Materials, textures, groups, quads | Blender exports in metres by default |
| STL to OBJ | Shape, vertices merged | Nothing (STL had nothing else) | Normals are recomputed; open edges remain open |
| GLB to STL | Shape, transforms applied | Materials, textures, animation, scene structure | Metres to millimetres: scale by 1000 |
| STL to GLB | Shape, with smooth normals | Nothing, but gains only a default grey material | Millimetres read as metres: scale by 0.001, and z-up to y-up |
| PLY to STL | Shape | Vertex colours, scanner metadata | Scans are rarely watertight |
| STL to STEP | Each triangle as a flat face | Nothing, but nothing is gained either | Produces an unusable CAD model of thousands of faces; avoid |
The rule behind the table is that mesh formats can be converted between each other freely, losing only what the target cannot hold, and that going from a mesh back to CAD (STL to STEP) does not recover the design. If someone asks for STEP, they need the original CAD file, not a converted STL. The converters on this site, STL to OBJ, OBJ, GLB, PLY or 3MF to STL and STL to GLB, cover the mesh-to-mesh cases and show the model and its dimensions before you download, so the scale traps in the last column are caught in the preview.