G-code Viewer
Visualize CNC and 3D printer G-code toolpaths online for free, distinguishing rapid moves from cutting moves and showing Z-axis height changes layer by layer. Catch slicing mistakes or verify a CNC program before running it, entirely in your browser.
Drag and drop a G-code file, or click to choose one
Supports .gcode, .nc, .ngc, .tap, .cnc files
Usage examples
Previewing a CNC program before running it
Check that a CAM-generated G-code file's toolpath looks right in your browser before loading it onto the machine.
Reviewing a 3D printer's print path
Upload a slicer-generated G-code file to see how the print head moves and confirm the path stays within the bed.
Telling rapid moves apart from cutting moves
Gray dashed lines mark rapid (non-cutting) moves and solid blue lines mark feed (cutting/printing) moves, so you can spot unnecessarily long rapid travel at a glance.
Catching a slicing mistake before a long print
Scan the toolpath for a part that should be solid but has gaps, or supports that are missing entirely, before committing several hours of filament and time to a failed print.
Understanding G-code shared on a forum or by a friend
Open a .gcode or .nc file someone sent you to see exactly what toolpath it produces, without needing a slicer installed or access to the original 3D model.
Checking a CNC toolpath's direction before cutting material
Confirm a CAM-generated program cuts in the expected direction and doesn't rapid-travel through material it shouldn't, before running it on real stock.
Comparing two slicer profiles on the same model
Load G-code exported with different slicer settings side by side to see how travel distance or infill paths change before deciding which profile to print.
Frequently asked questions
Is my uploaded file sent to a server?
No. Reading and parsing the file happens entirely in your browser and is never sent to a server.
Which G-code commands are supported?
Linear moves (G0, G1) and arc moves (G2, G3) are supported, recognizing both absolute (G90) and relative (G91) positioning. Other M-codes and similar are ignored since they don't affect the toolpath.
Does it show Z-axis (height) changes?
Currently it shows a top-down 2D path in the X-Y plane only. The bounding box stats include the total Z-axis range moved.
How accurate is the estimated time?
It's a simple sum of each segment's length divided by its programmed feed rate (F). It doesn't account for acceleration/deceleration, so actual machine time may differ.
Is a G-code file the same thing as a 3D model?
No. G-code is a toolpath — a list of movement and extrusion instructions generated from a 3D model (like an STL or 3MF file) by a slicer. This viewer shows that machine path, not the original mesh.
Does it work with G-code from any slicer or CNC software?
It reads standard G0/G1/G2/G3 motion commands, which covers output from common slicers like PrusaSlicer, Cura, and Bambu Studio as well as most CAM-generated CNC programs. Firmware-specific or printer-specific extensions beyond basic motion commands are ignored rather than rejected.
Can I step through the print layer by layer?
Not currently — the full toolpath is drawn at once rather than as a layer-by-layer animation.
Is there a file size limit?
Very large G-code files (for example, ones with millions of lines from a highly detailed print) may take longer to parse and render since everything happens in your browser's memory, but there's no hard size limit enforced by the tool.