STL, 3MF, STEP and G-code: file formats in 3D printing
are explained briefly when you hover over or tap them.
On model platforms you will find STL, 3MF, sometimes STEP, and in the end the slicer produces G-code. The formats store very different things: only the shape, the shape with colours and settings, an exact design or finished movement commands for a specific printer. If you know the differences, you know which file to download and which one to pass on.
Mesh or CAD: two kinds of 3D data
Before we get to the individual formats, one distinction helps:
- Mesh: The surface consists of many small triangles. A sphere is therefore really a polygon with a very large number of faces. The more triangles, the smoother, and the larger the file. STL, 3MF and OBJ are mesh formats.
- CAD (solid body): The geometry is described mathematically exactly. A circle stays a true circle, a bore has a precise diameter. STEP is the most important neutral CAD format.
A mesh prints well but is hard to edit. If you want to enlarge a bore by 0.5 mm, that is tedious in a mesh and quickly done in a STEP file with a CAD program.
The formats in detail
STL
STL is the oldest and most widespread format. It stores only the surface as triangles. No colours, no units, no settings. Because no unit is stored, the slicer assumes millimetres. If a model is suddenly tiny or huge, it was usually exported in inches or metres.
3MF
3MF is the more modern successor. The file is really an archive and can contain much more:
- several objects and their arrangement on the build plate
- colours and material assignments for multi-colour printing
- units
- slicer settings such as layer height, infill and supports, if it was saved as a project
If a designer offers a print profile, it is usually in a 3MF file. Be careful: a project 3MF from a slicer often contains printer profiles that do not match your machine. Most slicers ask when opening whether you want to load only the geometry or the settings too. With a different printer, “geometry only” is the safe way.
OBJ
OBJ is a mesh format from the world of graphics and animation. It can store colours and textures via additional files. In 3D printing it turns up mainly with models from Blender, 3D scans and coloured figures. Slicers can open OBJ, but it is rarely needed in everyday use.
STEP
STEP (extension .step or .stp) is a neutral CAD format. It stores exact solid bodies and can be opened and edited further in almost any CAD program. Many slicers can now import STEP directly and convert it to a mesh in the process. For technical parts that you want to adapt, STEP is the best choice.
G-code and bgcode
G-code is what the printer actually executes: a long list of commands such as “move to X/Y”, “extrude this much”, “heat to 215 °C”. The slicer generates it from the model and the settings.
Binary G-code (extension .bgcode) is a compressed variant that PrusaSlicer produces for newer Prusa printers. The file is smaller and contains preview images. Bambu printers receive the G-code in their own packaging as .gcode.3mf.
The formats compared
| Format | Type | Stores | Editable | Typical use |
|---|---|---|---|---|
| STL | Mesh | geometry only | poorly | standard for sharing and printing |
| 3MF | Mesh | geometry, colours, units, settings if applicable | poorly | print profiles, multi-colour printing, projects |
| OBJ | Mesh | geometry, colours, textures | poorly | figures, scans, Blender |
| STEP | CAD | exact solid bodies | well | technical parts, further design work |
| G-code / bgcode | Machine commands | toolpaths, temperatures, speeds | no | finished print file for one printer |
Which format when?
- Downloading a model: 3MF if available. Otherwise STL. If STEP is also available and you want to change something, take STEP too.
- Sharing your own model: STL for maximum compatibility, with a 3MF with print profile as a supplement. A STEP file will please everyone who wants to adapt your part.
- Saving a project: as 3MF from the slicer. That way the arrangement, colours and settings are kept.
- Sending to the printer: G-code or bgcode, generated with the matching printer profile.
Do not swap G-code between printers
G-code is written for exactly one printer. It contains the dimensions of the print bed, the start sequence, and temperatures and speeds for that machine and that material. On a different printer, in the best case it will not start, in the worst case the nozzle drives into the bed or heats wrongly.
So never download G-code from platforms to print it directly, unless it was expressly created for your model and your material. It is better to take the STL or 3MF and slice it yourself. How that works is explained in the slicer comparison.
Continue with: Finding 3D models or Creating your own 3D models if you want to produce STEP files yourself.