Home / G-code back to STL
Free · runs in your browser

Can You Convert G-code Back to an STL File?

Yes. Drop the .gcode or Prusa .bgcode file on the tool above and MeshShift rebuilds the printed part as one closed STL you can scale, edit or reprint.

Yes. Drop the .gcode or Prusa .bgcode file above and MeshShift rebuilds the printed toolpaths into one closed, watertight STL in millimetres, free with no sign-up and no upload. It matches the printed part, with layer steps and rounded fine detail, and downloads as STL, 3MF or OBJ. If you still have the original model, that is more exact.

Drop your G-code files here
or choose files · STL, 3MF, OBJ, GLB, FBX, STEP, PLY, DAE, IGES, G-code… · batch OK
Processed in your browser — files are never uploaded
No file handy?
Free, no sign-upFile never uploadedClosed STL rebuilt from toolpaths.gcode and .bgcode

In short: Yes, you can turn G-code back into an STL, but the result is a rebuild of the printed part, not the original model. G-code stores nozzle moves and extrusion amounts layer by layer, not surfaces, so a converter has to rebuild the shape from the toolpaths.

On MeshShift you drop the .gcode file (or a Prusa .bgcode) onto the tool above: it reads the file in your browser, gives every extruding move the width and height of a real printed line, and wraps them in one closed, watertight mesh in millimetres with Z up. You download it as STL, 3MF or OBJ, free with no account and no upload. Overall shape, walls, holes and readable text come back well; fine curves are stepped by the layer height and sharp corners are rounded. Supports, brims and skirts are part of the toolpath, so trim them in the STL editor or your slicer. If you still have the original STL or 3MF, or the 3MF project the slicer saved, use that instead: it is always more exact.

How to use the Can You Convert G-code Back to an STL File? tool

  1. Drop the .gcode or .bgcode file onto the tool above.
  2. Check the layer count and size in the preview.
  3. Let MeshShift rebuild the toolpaths into one closed solid.
  4. Download STL, 3MF or OBJ and open it in your slicer or CAD tool.

Why G-code is not just an STL in disguise

A slicer turns a surface model into thousands of lines like "move to X 102.4 Y 88.1 while extruding 0.03 mm of filament". The original triangles are gone. What remains is the path the nozzle took, layer after layer, plus temperatures, fan speeds and travel moves. That is why simple "renaming" or text tools cannot produce a usable STL, and why some converters only show the toolpath as lines you cannot print. A real rebuild has to give each line a thickness and merge them into a solid.

When converting G-code to STL makes sense

  • **You lost the original file** and only have the .gcode on the printer's SD card or USB stick.
  • **Someone shared a print file** for a different printer and you want to re-slice it for yours, with your own nozzle, layer height and filament.
  • **You want to measure or modify** a part you printed before, for example to scale it or cut it.
  • **You print-farm or sell parts** and need a quick visual of an old job.

It makes less sense when you can download the original model from Printables, Thingiverse or MakerWorld: grab that instead.

What comes out, and how to clean it up

The STL is a closed solid standing on the build plate. Expect visible layer steps, rounded small details and slightly thicker walls where the extrusion width was large. Infill is inside the walls and gets merged away. Supports, brims, skirts and purge towers do print as plastic, so they come back too: remove them with the plane cut in the STL editor or by splitting parts in your slicer. Then slice the cleaned STL with your own profile.

Re-slicing for a different printer

A G-code file is locked to one printer: its bed size, nozzle, firmware and filament settings. Printing a Bambu file on a Prusa, or an Ender file on a Bambu, usually fails or crashes the nozzle. Converting it back to STL frees the shape from those settings. After conversion, check the size in the preview, remove supports and brims, then open the STL in your own slicer and slice it with your printer's profile, nozzle and layer height. Small parts may need a fresh support layout, because the old supports were planned for another machine.

G-code flavours that work

Plain text G-code from Cura, PrusaSlicer, OrcaSlicer, Bambu Studio, SuperSlicer, Simplify3D and Creality Print works, as does Prusa's binary .bgcode with heatshrink or deflate compression and MeatPack. Very large files with millions of moves take longer on phones but still run locally.

Frequently asked questions

Is there a free G-code to STL converter?

Yes. MeshShift converts .gcode and .bgcode to STL, 3MF or OBJ in your browser, free with no account and no file-size limit beyond your device memory. The file is never uploaded.

Will the STL be the same as the original model?

No. It is rebuilt from the printed toolpaths, so it matches the printed part: same size and shape, with layer steps and rounded fine detail. The original model is always more exact if you have it.

Can Cura or PrusaSlicer open G-code as a model?

They can preview G-code as toolpaths, but they cannot turn it back into a printable model. You need a converter that rebuilds the paths into a solid, like the tool above.

Can I convert G-code to STL on my phone?

Yes. Open this page in Safari or Chrome, pick the .gcode file from Files or Downloads and download the STL when it is ready.

Does it remove supports?

Supports are part of the toolpath, so they come back as plastic. Cut them off in the STL editor or your slicer after conversion.