G-code to STL Converter

To convert G-code to STL, drop your .gcode file here. The tool reads every extrusion move, groups them into layers by height, and turns each layer's outer walls into a solid slice. Stacked, the slices form an STL you can download and slice again. The result is close to the original model, not identical.

Free · no signup · your file stays in your browser

Loading the G-code converter...

How G-code to STL conversion works

  1. 1

    Open the G-code

    Drop a .gcode file (or a Bambu/Orca .gcode.3mf). It is read in your browser; nothing is uploaded.

  2. 2

    Read the moves

    Every G0/G1 move is followed with absolute or relative positions, relative or absolute extrusion, G92 resets and inch or millimetre units. Moves that push filament are printing; the rest is travel.

  3. 3

    Find the walls

    Extrusion moves are grouped into layers by Z. The slicer's line-type comments mark the outer walls; files without them are checked shape by shape.

  4. 4

    Rebuild and download

    Each layer's outer walls are filled, widened by half a line and raised to the layer height. Check the preview with the layer slider, then download a binary STL.

Approximate by nature. G-code holds the nozzle's path, not the model, so no tool can give back the exact original STL. The rebuilt model is stepped by the layer height and loses detail finer than one printed line. Check it before you print it again.

What this G-code converter does

Two ways to rebuild

Solid layers gives a closed, small STL of the part. Printed paths turns every line, infill included, into a thin bar.

Layer by layer preview

Colours run from the first layer to the last. Drag the slider to look inside and see the tool paths of any layer.

Print numbers

Layers, print height, layer height, line width, extrusion and travel length, retractions and filament used in metres, cm³ and grams.

Most slicers

Cura, PrusaSlicer, SuperSlicer, OrcaSlicer, Bambu Studio, Simplify3D and plain G-code with no comments.

Private

Runs entirely in your browser. Your G-code never leaves your computer.

Free

No signup, no watermark, no limit on how many files you convert.

Got the shape back? Take it further with AI

The rebuilt STL opens straight in our AI tools. Lost the model completely? Make a new one in about a minute.

Frequently Asked Questions

Yes, approximately. G-code is a list of nozzle moves, not a 3D model, so the original STL cannot be recovered exactly. This tool rebuilds the shape from the moves: each layer's outer walls become a solid slice of the layer height. Curves and sizes come back closely; sides are stepped by the layer height and detail finer than the line width is lost.
Plain-text G-code from Cura, PrusaSlicer, SuperSlicer, OrcaSlicer, Bambu Studio, Simplify3D and most others. Their line-type comments tell the tool which lines are outer walls. Files with no comments still work: each loop is checked for printed material on one side or both. Binary .bgcode files must be exported as plain G-code first.
A slicer throws information away: the model is cut into layers and each layer into lines. The rebuilt STL has flat steps the height of one layer, a flat top and bottom on each step, and no detail smaller than one line. Supports, skirt and brim are left out by default. Use the original file whenever you still have it.
Solid layers keeps only the outline of each layer and fills it, so you get a closed, small STL that slices again like the original part. Printed paths turns every extruded line, infill included, into a thin bar: it shows exactly what was printed, but the file is much larger and is meant for viewing.
No. The file is read, rebuilt and saved by your own browser. Nothing is sent to a server, and you do not need an account. Files up to 200 MB work; very large prints are faster with "Use every 2nd layer".

More free STL tools