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 get | The area inside the outer walls, holes kept, infill filled in | Walls and infill exactly as printed |
| 20 mm cube | 1,498 triangles | 64,060 triangles |
| 100-layer cube, time | about 0.1 s | about 2 s |
| Good for | Re-printing, measuring, pricing | Looking 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
- Our 20 mm cube G-code returns an STL of 20.00 × 20.00 × 20.00 mm, watertight, 8.0 cm³.
- A cube with a hole keeps the hole; volume lands within 3 %.
- A PrusaSlicer file of a real part gives 16.85 × 16.85 × 4.0 mm; its source STL measured 16.8 × 16.8 × 4.0.
- A second part gives 66.0 × 42.0 × 21.4 mm against 66.0 × 42.0 × 21.6 in the source STL.
Steps to convert G-code to STL
- Drop the .gcode file on this page or press Open File. The toolpath opens in the layer viewer first.
- The part is rebuilt right away; the result bar shows the file name, size and X × Y × Z in mm.
- Switch between Solid part and Every extrusion line if you need the infill.
- 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
- The file will not open. It is probably a .bgcode or .gcode.3mf package. Re-export plain .gcode and try again.
- The tool refuses to convert. The file has no extrusion, as in a milling or laser program, so there is nothing printed to rebuild.
- The mesh is very heavy. You picked Every extrusion line. Switch to Solid part, or open the result in the editor and use Reduce triangles.
- A size is a fraction off. The edges follow the printed lines, so expect up to half a line width of difference, and a small gap in height (21.4 mm against 21.6 mm for the source STL in our test). Check it in Info and use Edit → Size if you need an exact number.
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.