G-code to STL converter

Lost the STL and only have the G-code? Drop it here. When the slicer labelled its moves, the outer walls of each layer are filled and stacked to rebuild the printed object, ready to save as STL, 3MF or OBJ.

3D model converterSVG to STLImage to STLText to STLDXF to STL3D viewer

When you only have the G-code

It happens more often than you would think: a print file shared on a forum, an SD card from a second-hand printer, a project whose STL was lost. G-code is the end of the pipeline — it already contains the shape, layer by layer, just not in a form any modelling tool understands.

How the model is rebuilt

Every modern slicer writes a comment before each group of moves saying what they are: outer wall, inner wall, infill, support. The converter keeps only the outer walls, joins them into closed loops on each layer, fills them (keeping holes as holes), and extrudes each layer by its height. Layers with exactly the same outline are merged, so straight-walled parts come out as clean blocks rather than hundreds of slices.

Supports, brims and skirts are not outer walls and are left out automatically. Overhangs and curved tops show the stair-steps of the original layers. For inspection without converting, use the G-code viewer.

Nothing is uploaded

Most online converters send your file to a server, process it there and hand back the result — which means your drawing or photo sits on someone else's disk for however long their retention policy says. This page does all of the work in your browser tab. The file is read with the browser's FileReader, converted by JavaScript on your own processor and saved straight to your downloads folder. You can confirm it: open your browser's developer tools, switch to the network tab and watch that no request carrying your file is ever made.

Frequently asked questions

How accurate is the recovered STL?

As accurate as the slice: the outline of every layer is exact to the toolpath, and the height is stepped by the layer height you sliced with. The outline follows the centre of the outer wall, so the part comes out roughly half a line width smaller — scale it up by that amount if the fit matters.

Which slicers are supported?

Any slicer that writes feature labels: PrusaSlicer and SuperSlicer (;TYPE:External perimeter), Bambu Studio and OrcaSlicer (Outer wall), Cura (;TYPE:WALL-OUTER) and Simplify3D (; outer perimeter). Without labels the toolpath is shown as beads instead.

Can I re-slice the recovered model?

Yes. Save it as STL or 3MF and open it in your slicer. Re-slicing with a smaller layer height will not add detail that was not in the original G-code, but you can change material, infill, scale or printer.

Why is my result made of thin lines?

The G-code had no feature labels, so outer walls could not be identified. The converter then draws every extrusion move, which is useful for inspection but not as a model to print.

More conversions

Want a finished design rather than a conversion? LyraMaker has more than a hundred free generators — name keychains, plates, monograms, rulers, QR codes and more, all exporting STL and 3MF.
Browse the generators →