G-code to STL Converter: Rebuild the Printed Part
Add to Chrome
EnglishEN
Home › G-code › G-code to STL

G-code to STL

Drop a G-code file and the G-code to STL converter rebuilds the part your printer would lay down, as a closed mesh. Choose Solid part or Every extrusion line, then press Download STL.

You get the printed shape with layer steps, not the original model. CNC and laser files have no extrusion and cannot be converted.

Drop STL, OBJ, 3MF, STEP or G-code here

or click to browse

Also GLB / glTF, PLY, IGES, OFF, 3DS, FBX, DAE, WRL, AMF · several files at once (OBJ + MTL, glTF + BIN)

🔒 Files are opened by your browser and never leave your device

How the part is rebuilt

Each layer's extrusion lines are merged into flat 2D areas. Every area is raised by its layer height, and all layers are joined into one closed mesh. Skirt, brim, purge lines and supports are left out, so only the part remains.

Plain G-code without feature comments also works. In that case the tool closes the gaps between infill lines to find the solid area.

The typical reason to do this is a part you printed a year ago: the STL went with an old laptop, and the G-code is still on the SD card. One conversion here gives you a mesh you can measure and print again.

Solid part or every extrusion line

Solid part (default)Every extrusion line
What you getThe area inside the outer walls, holes kept, infill filled inWalls and infill exactly as printed
20 mm cube1,498 triangles64,060 triangles
100-layer cube, timeabout 0.1 sabout 2 s
Good forRe-printing, measuring, pricingLooking at the infill pattern in 3D

Solid part gives a watertight mesh, so the file goes straight back into a slicer or into the editor.

Tested numbers

Steps to convert G-code to STL

  1. Drop the .gcode file on this page or press Open File. The toolpath opens in the layer viewer first.
  2. The part is rebuilt right away; the result bar shows the file name, size and X × Y × Z in mm.
  3. Switch between Solid part and Every extrusion line if you need the infill.
  4. Press Download STL, or Convert another file to start over.

Binary .bgcode and .gcode.3mf packages do not open; export plain G-code from the slicer that made them.

When the STL does not look right

What changes against the original model

Slopes turn into stairs as tall as the layer height, for example 0.2 mm. Edges can sit up to half a line width in or out. Fillets become steps, and details narrower than one line disappear.

That is fine for printing the same part again or checking its size when the G-code is all you have. To change the design, ask for the source file or remodel it in your CAD program.

After the STL is ready

The converted mesh stays in the viewer. Press Info to read dimensions and volume, or send it through the STL editor to scale or cut it. To print it again with new settings, slice it on the STL to G-code page.

Need only the numbers? The print time page and the 3D print cost calculator read them from the G-code or the mesh.

Questions and answers

Can you convert G-code back to the original STL?

Not the original. The tool rebuilds what the nozzle would print, with layer steps on slopes and edges within half a line width.

Which mode should I choose?

Solid part for almost everything: it is light and watertight. Every extrusion line makes a far heavier mesh: 64,060 triangles on a cube against 1,498.

Are supports and the brim included?

No. Skirt, brim, purge lines and supports are removed, so the STL holds only the part.

Can I convert CNC or laser G-code to STL?

No. Those files contain no extrusion, so there is no printed shape to rebuild. The tool tells you this instead of saving an empty file.

How long does the conversion take?

A 100-layer cube takes about 0.1 s as a solid part and about 2 s with every extrusion line.

Is the G-code uploaded for conversion?

No. Parsing and meshing run in this tab. In our test run every request went to our own domain and nothing was posted.