Free tool
Online G-code viewer and simulator
Drop a .gcode file. Scrub through the layers, play the toolpath and check time and filament before you print or cut.
Runs in your browser. Nothing is uploaded.
How to use it
1Open your file
Drop a .gcode, .nc, .ngc or .tap file, or a Bambu Studio or OrcaSlicer .gcode.3mf, or try a sample. It is read on your device.
2Check the numbers
Print or machining time, filament length and grams, layers, size, travel and retractions are listed before you run anything.
3Step through the layers
Drag the layer slider to look inside the print, or show one layer only. The move slider steps through a single layer and shows the G-code line behind each move.
4Play the toolpath
Press Play to simulate the job at 1× to 1000× speed and watch the nozzle or the cutter follow every move.
To view a G-code file, drop it into the viewer above. Every move is drawn in 3D, layer by layer, with the print time, filament, size and travel listed beside it, and you can play the toolpath to watch the nozzle or the cutter follow it. It reads 3D printer files from any slicer as well as CNC and laser jobs, and the file never leaves your device.
What G-code is
G-code is the list of instructions a 3D printer, CNC router or laser follows, one command per line. G1 X20 Y10 E0.5 F1800 means: move in a straight line to X 20, Y 10, push 0.5 mm of filament on the way, at 1,800 mm per minute. Your slicer or CAM program writes it from a model and the machine runs it line by line. It is plain text, so any editor opens it, but a column of coordinates tells you little until you see it drawn.
Check a print before you start it
- First layer. Turn on Show one layer only and go to layer 1. Look for a closed skirt or brim, walls that touch, and nothing printed in mid-air.
- Supports. Step up through the overhangs. Every support should start on the plate or on the part below it.
- Travel. Switch on travel moves. Long moves across visible surfaces are where strings appear, and the retraction count shows how often the nozzle pulls back.
- Time and material. Read the print time and grams before a long job, then put them into the 3D print cost calculator to price it.
- Size and position. Check the size of the printed objects, and where they sit on the plate: the small axes mark X0 Y0.
Slicer previews and this viewer
Your slicer already previews the G-code it writes, with views this page does not have, such as fan speed and temperature.
- PrusaSlicer switches to its preview when you slice. File, G-code preview opens the PrusaSlicer G-code Viewer, which Prusa's help center describes as an app to quickly preview G-codes from all popular slicers.
- Bambu Studio opens a Preview tab after slicing, with colour schemes for line type, filament, speed, layer height, line width, flow, layer time, fan speed and temperature, according to the Bambu Lab wiki.
- OrcaSlicer can import sliced G-code to show its toolpaths, according to the OrcaSlicer wiki.
This viewer covers the cases in between: a file someone sent you, a computer or phone with no slicer installed, a CNC or laser job your slicer cannot open, or a quick check without loading a project. If the model itself looks wrong, fix it before you slice: see how to fix STL files or use the STL repair tool.
CNC and laser G-code
| Code | What it does |
|---|---|
| G0 | Rapid move, not cutting. Drawn as a thin line. |
| G1 | Straight move at the feed rate F: a cut, an engraving or a print move. |
| G2, G3 | Clockwise and counterclockwise arcs. I and J give the centre, or R the radius. |
| M3, M4 | Spindle or laser on. S sets the spindle speed or the laser power. |
| M5 | Spindle or laser off. |
| G20, G21 | Coordinates in inches, or in millimetres. |
| G90, G91 | Absolute or relative coordinates. |
Cuts are drawn in amber, plunges in pink and rapids as thin grey lines, with one pass per depth level. For a laser, colour the path by power to see where the S value changes. G-code does not record how fast G0 moves run, so the machining time uses the rapid speed you enter. On GRBL that is the max rate in settings $110 and $111, in mm per minute. To dial in power and speed for a material, start from the laser and CNC settings chart.
Which files open
| File | Usually from |
|---|---|
| .gcode, .gco, .g | 3D printer slicers: Cura, PrusaSlicer, OrcaSlicer, Bambu Studio, Simplify3D |
| Sliced .3mf (.gcode.3mf) | Bambu Studio and OrcaSlicer plate exports. The G-code inside is shown |
| .gcode.gz | Compressed G-code |
| .nc, .ngc, .tap, .cnc | CNC routers and mills |
| .gc, .txt | Laser engravers and other G-code |
PrusaSlicer's binary G-code (.bgcode) does not open yet. Convert it to plain G-code with File, Convert in PrusaSlicer, or turn off binary G-code for that printer. To look at the model rather than the toolpath, open the STL or 3MF in the online STL viewer. G-code cannot be turned back into a clean model, but other mesh formats can: the STL file converter turns OBJ, GLB, PLY and 3MF into STL.
Questions
How can I view a gcode file?
Open it in a G-code viewer. Drop it on this page to see every move in 3D, layer by layer, with the print time and filament. Your slicer can preview G-code too: PrusaSlicer has a G-code viewer under File, G-code preview, and OrcaSlicer can import sliced G-code.
What program opens gcode?
Any text editor, because G-code is plain text. To see the toolpath, use a G-code viewer like this one, the PrusaSlicer G-code Viewer, or a slicer that imports G-code such as OrcaSlicer or UltiMaker Cura. Printers, CNC routers and lasers run it directly.
Can I convert G-code back to STL?
Not reliably. G-code stores the path of the nozzle, not the surface of the model, so any mesh rebuilt from it is a rough guess. Keep the original STL or 3MF. If your model is in another mesh format, the STL file converter turns OBJ, GLB, PLY and 3MF into STL.
Is my file uploaded?
No. The file is read and drawn in your browser, on your own device. Nothing is sent to a server, so client files and unreleased designs stay private.
Why is the print time different from my slicer?
When your slicer writes its estimate into the file, the viewer shows that number. Without one, it adds up distance divided by feed rate, which leaves out acceleration, heating and pauses, so the real print takes longer. Firmware limits also make every estimate differ from the clock.
Can I see CNC toolpaths?
Yes. Open a .nc, .ngc or .tap file to see cuts, plunges and G0 rapids in 3D, with arcs, depth passes and the machining time at your machine's rapid speed. Files in inches (G20) are converted to millimetres.
Does it open Bambu Studio files?
Yes. Open the .gcode, or the plate file that Bambu Studio and OrcaSlicer export as a sliced 3MF. The viewer reads the G-code inside it and shows the slicer's own time estimate.
Read next

3D printing
How Much Does 3D Printing Cost? Real Numbers, and How to Price Prints to Sell
What a 3D print costs at home or from a service: filament, power, wear and failures, resin vs FDM, and a pricing formula with Etsy fees for prints you sell.
October 8, 2026 7 min read

3D printing
How to Fix STL Files: Holes, Non-Manifold Edges and Other Errors
How to fix STL errors: what open edges, non-manifold edges, flipped normals and self-intersections mean, what your slicer is saying, and the fix for each.
October 8, 2026 8 min read

3D printing
The Best STL Viewers for Windows, Mac, Android and iPhone (2026)
Free ways to open STL, OBJ and 3MF files in 2026 now that Microsoft 3D Viewer is gone: browser viewers, slicers, MeshLab, Blender and apps for phones.
September 24, 2026 3 min read