gizmobench

G-code Viewer

Open a .gcode file or paste G-code to see a top view of its toolpath, one layer at a time. Every drawn move is linked to the source line that made it: select a move to read its line, or pick a line to find its move. The viewer interprets G0 and G1 moves, true G2 and G3 arcs in the XY plane from I and J or R, inch and millimetre units (G20, G21), absolute and relative positioning (G90, G91) and G92 coordinate shifts. Commands it does not interpret, from temperature settings to homing and other work offsets, are listed with their line numbers instead of being quietly skipped, and the ones that could change where the machine is are shown first. Your file is read by a background worker in your browser and never uploaded.

Your G-code

Files up to 25 MB are read in this browser tab and never uploaded. You can also drop a file on this panel.

These apply until the file sets its own units or mode.

Toolpath, top view

Nothing drawn yet.

Open a G-code file

or paste G-code, or load the example.

No layers yet

  • work
  • travel
  • lower layers
  • selected

In the view, Page Up and Page Down change layer, Left and Right step through moves, plus and minus zoom, and 0 fits. Tap or click a line to select its move; drag with a mouse to pan.

No toolpath yet.

Open a G-code file or paste G-code to draw its toolpath.

Worked cases

  • Mixed modesG90, G1 X10, then G91, G1 X5
    ends at X15
  • InchesG20, G90, G1 X1
    X25.4 mm
  • UnsupportedM104 S200, M140 S60, G1 X5
    2 unsupported lines listed, 1 move drawn

Each result is computed by this page's interpreter with millimetres and absolute positioning at the start.

How the drawing reads. Work moves are the ones that extrude when a file has E values, and otherwise the G1, G2 and G3 feed moves; everything else is travel, drawn dashed. G2 and G3 arcs in the XY plane are drawn as true arcs from I and J or R. Coordinates are shown in millimetres, with G20 inch values converted at 25.4 mm per inch.

Common questions

Which G-code commands does the viewer draw?
G0 travel moves, G1 feed moves, and G2 and G3 arcs in the XY plane, from either I and J centre offsets or an R radius, full circles included. It also applies G20 and G21 units, G90 and G91 positioning, G90.1 and G91.1 arc-centre modes, G92 and G92.1 coordinate shifts, M82 and M83 extrusion modes, and G17, G18 and G19 plane selection, so an arc outside the XY plane is listed instead of drawn. G54 is taken as the default work offset and drawn as written. Every other command is listed with its line numbers rather than guessed at.
What happens to commands it does not support?
They are counted and listed by line. Commands that can change where the machine is, such as G28 homing, G53 machine-coordinate moves, work offsets like G55, probing, canned cycles, firmware macros and rotary axis words, come first in a highlighted box, because the drawing after them may not match the machine. Machine functions such as temperatures and fans are listed separately. The copied or downloaded report includes every line number.
How does it tell printing moves from travel?
When a file has E values, a move that increases extrusion is a work move and every other move is travel. In a file without E values, such as CNC or laser G-code, G1, G2 and G3 feed moves are work and G0 rapids are travel. The move filter shows either kind on its own.
How are layers worked out?
Each Z height that has work moves on it becomes a layer, ordered from lowest to highest, and heights that round to the same thousandth of a millimetre count as one. Travel moves, Z hops included, are grouped with the layer being worked when they happen, and travel before the first work move joins that move's layer. Step through layers with the buttons, the slider, or Page Up and Page Down in the view.
Are inch programs converted?
Yes. G20 switches to inches and G21 back to millimetres at the line where each appears, and inch values are converted at exactly 25.4 mm per inch, so G20 followed by G1 X1 ends at X25.4 mm. If a file never sets its units or positioning mode, choose the start settings yourself.
Can it estimate print or machining time, or validate a file before it runs?
No. Real timing depends on feed rates, acceleration and firmware planning, which this viewer does not simulate, so it makes no time claim. It also does not check for collisions, limits or a valid print. It shows the path the file describes, and lists what it could not interpret.
Is there a file size limit?
Yes: files up to 25 MB (25,000,000 bytes). A larger file is refused with a message, so export fewer objects or split the job. Parsing runs in a background worker in your browser, and a read in progress can be cancelled.
Can it open binary G-code (.bgcode)?
No. It recognises a binary .bgcode file and says so rather than drawing nonsense. Export plain .gcode from your slicer and open that instead.

Positions follow G0, G1, G2 and G3 moves with G20/G21 units, G90/G91 modes and G92 shifts, shown to 0.001 mm in the frame the file started in. It is not a machine simulator, safety check or execution tool: coordinate and motion commands it does not apply are listed first with their line numbers, and it makes no machining-time claim.