STL → G-CODE · SLICING, EXPLAINED
STL to G-code — the Step Everyone Calls a Conversion
STL to G-code is slicing, not file conversion: the same triangles become completely different machine moves for different printers, nozzles, layer heights and materials. Use a free slicer for that step; use this site for the checks that come before it.
STL to G-code is slicing, not file conversion
STL describes a shape (triangles). G-code is a list of machine moves: heat to temperature, move to coordinates, extrude N mm. The same STL produces completely different G-code for different printers, nozzles, layer heights and materials — that is why there is no meaningful universal “STL to G-code converter”, and why generic online converters are the wrong tool (their output embeds someone else's printer profile, which at best prints badly).
The pipeline: STL → slicer (choose settings) → G-code → printer.
Free slicers that do it properly
| Slicer | Best for |
|---|---|
| PrusaSlicer | Free, open source; excellent defaults, huge printer-profile library |
| Cura | Free; the long-time default for many printers, deep setting access |
| Bambu Studio | Free; made for Bambu printers, project-based 3MF workflow |
| OrcaSlicer | Free, open source; community fork with built-in calibration tests, supports most brands |
All four are desktop apps; all import STL and export G-code.
Before you slice: 60-second pre-flight
- Broken meshes are the top cause of failed slices — holes and non-manifold edges make the slicer guess what is inside. Check the file with the free STL repair checker on this site (runs in the browser, nothing uploaded).
- Confirm real-world size in the STL viewer — STL has no units and a meters-vs-millimeters mixup shrinks a part 1000×.
- If the model came from an AI generator as GLB, convert it first.
FAQ
Can I convert STL to G-code online without installing anything?+
Generally a bad idea — G-code is printer-specific; a slicer profile for YOUR machine is the point. Install one of the free slicers above.
Is G-code the same for every printer?+
No — flavors like Marlin, Klipper, RepRap; Bambu machines wrap it in their own project format. Slicers handle this via printer profiles.
Why is my G-code file so much bigger than the STL?+
Every toolhead move is a line of text; a multi-hour print is hundreds of thousands of moves.
Can I convert G-code back to STL?+
Effectively no — the shape information is gone; only toolpaths remain. Keep your STL.
Which settings matter first?+
Layer height, infill percentage, supports on/off, print temperature — the defaults from a built-in printer profile are the right starting point.
Why does my slicer say the model is broken?+
Holes or non-manifold edges in the mesh — run it through the STL repair tool on this site first.