How G-code to STL conversion works
- 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
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
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
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.
Bambu Studio and OrcaSlicer: .gcode.3mf files
Bambu Studio and OrcaSlicer often save a sliced plate as a .gcode.3mf file. It is a zip archive with the plate's G-code inside, plus a few preview images. Drop it here as it is: the tool unzips it in your browser and reads the G-code.
If the file holds more than one plate, one of them is rebuilt and a note says which one and how many plates the file has. A plain project .3mf that was never sliced has no G-code inside; open that one in the 3MF to STL converter instead.
PrusaSlicer binary G-code (.bgcode) to STL
Newer PrusaSlicer versions can save binary G-code (.bgcode), a compressed format for Prusa printers. This tool reads plain-text G-code only. In PrusaSlicer, turn off Binary G-code under Printer Settings > General, slice again and export, then drop the new .gcode file here.
How to get the closest STL from G-code
Use Solid layers when you want to print the part again: it gives a closed STL of the outside shape. Printed paths is for looking at how the part was printed, infill included, and makes a much larger file.
The sides of the rebuilt STL are stepped by the layer height of the original slice, so G-code sliced at 0.12 mm comes back smoother than G-code sliced at 0.28 mm. Supports, skirt and brim are left out. Check the result in the STL viewer, and run it through STL repair if your slicer reports errors.
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.






