Online G-Code Viewer
Free online G-Code Viewer. Visualize CNC and 3D printer paths (G0, G1, G2, G3) instantly. Analyze bounding boxes, cut time, and path errors.
About
This Online G-Code Viewer provides a precise, browser-based simulation of CNC and 3D Printer toolpaths. Unlike basic text editors, this tool interprets the geometric logic of G-Code, rendering moves, arcs, and rapid travels on an interactive 2D canvas.
CNC machining relies on precise coordinate systems. A standard linear move is defined as a vector from Pstart to Pend. This tool calculates the Euclidean distance d = √Δx2 + Δy2 and renders the path with color-coded velocity states (Rapid vs. Feed).
Critical for verification, the viewer parses complex Circular Interpolation commands (G2/G3), calculating arc centers using the offset parameters I and J. It also validates the Bounding Box limits to prevent machine crashes by exceeding axis travel.
Formulas
Linear Interpolation Time (t)
Where F is the Feed Rate.
Arc Center Calculation (I, J offsets)
Reference Data
| Code | Function | Type | Parameters |
|---|---|---|---|
| G0 | Rapid Positioning | Motion | X, Y, Z |
| G1 | Linear Interpolation | Motion | X, Y, Z, F (Feed) |
| G2 | Clockwise Arc | Motion | X, Y, I, J, R |
| G3 | Counter-Clockwise Arc | Motion | X, Y, I, J, R |
| G20/G21 | Units (Inch/mm) | Setup | None |
| G90/G91 | Absolute/Relative | Setup | None |
| M3/M5 | Spindle On/Off | Machine | S (Speed) |
| F | Feed Rate | Parameter | Value (units/min) |