G-code viewer online
Open G-code files instantly — measure in mm, cut a section, spot overhangs and check if the model is ready to print. Nothing is uploaded.
What is a G-code file?
G-code is the long-standing numerical control language for CNC machines, standardised as RS-274, and 3D printers use a dialect of it. A .gcode file is a text list of commands such as G1 X50 Y20 E0.8 F1800, which moves the nozzle while extruding, plus M-codes for temperatures, fans and bed settings. A slicer such as Bambu Studio, PrusaSlicer, OrcaSlicer or UltiMaker Cura produces it from a model by cutting the shape into layers and choosing perimeters, infill, speeds and supports. The result is tied to one printer, one filament profile and one set of settings. Prusa's firmware also accepts a compressed binary variant, .bgcode, and some machines use .gco or plain .g. Because it describes motion and not surfaces, G-code cannot be edited like a mesh, and it is not a way to share a design.
What a G-code file can store
G-code stores a sequence of machine instructions: moves with coordinates in millimetres (or inches), extrusion amounts, feed rates, temperature and fan commands, retractions, tool changes and start and end routines. Slicers add comments that label layers, features and estimated time. It holds no surfaces, no colour, no normals and no object boundaries. Any solid shape has to be reconstructed from the extrusion paths, and that reconstruction is approximate.
Apps that open G-code
Bambu Studio, PrusaSlicer, OrcaSlicer, UltiMaker Cura, Simplify3D, OctoPrint, Pronterface, Repetier-Host, Klipper (Mainsail, Fluidd), Creality Print.
Strengths
- Exactly what the printer runs, with no further interpretation
- Text form is easy to inspect and tweak
- Previewers show layers, speeds and travel moves
- Works on any firmware that understands the dialect
Limits
- Not a model: cannot be resized or repaired as geometry
- Tied to one printer, firmware and slicer profile
- Dialects differ between Marlin, Klipper and Bambu firmware
- Recovering a solid from it is approximate
G-code and 3D printing
G-code is the last step of printing, not an input to it. You usually cannot print a G-code from a different printer without risking collisions, wrong temperatures or an out-of-range bed. People open G-code to preview layers, check estimated time, or rescue a design when the source file is lost. MeshShift reads G-code, shows a layer preview, and can rebuild the printed toolpaths into a closed solid saved as STL, 3MF or OBJ. That solid is approximate and depends on the chosen resolution, so thin walls and fine detail are rounded off; treat it as a stand-in for the lost model rather than an exact copy. MeshShift does not write G-code.
Frequently asked questions
How do I open a G-code file without installing software?
Drop the G-code file on this page. It opens in your browser with studio lighting and real dimensions; nothing is uploaded. You can rotate, zoom, measure between two points, cut through the model and check whether it is watertight for printing.
Can I convert G-code back to an STL?
Approximately. A slicer discards the original surfaces, so a converter has to rebuild a solid from the extrusion paths. The result matches the printed shape at the chosen resolution but loses fine detail and has stair-stepped layers. It is useful when the source model is gone.
Why won't my G-code work on another printer?
It contains commands, coordinates, temperatures and start routines written for one machine. A different printer can have another bed size, firmware dialect or extruder setup, so the same file may crash the nozzle or fail. Re-slice the original model for the target printer.
What does MeshShift do with G-code files?
MeshShift reads G-code in your browser, previews it layer by layer, and can rebuild the toolpaths into a closed solid saved as STL, 3MF or OBJ. The solid is approximate. MeshShift does not create G-code, so you still need a slicer to print.