User Rating 0.0
Total Usage 0 times
0 lines 0 x 0 mm
Min Z 0.00
Max Z 0.00
Travel 0m
Time 0s
Rapid (G0)
Feed (G1)
Arc (G2/3)
Parsing...
Is this tool helpful?

Your feedback helps us improve.

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.

g-code cnc simulator viewer cam

Formulas

Linear Interpolation Time (t)

t = (x2x1)2 + (y2y1)2F

Where F is the Feed Rate.

Arc Center Calculation (I, J offsets)

Cx = xstart + I
Cy = ystart + J

Reference Data

CodeFunctionTypeParameters
G0Rapid PositioningMotionX, Y, Z
G1Linear InterpolationMotionX, Y, Z, F (Feed)
G2Clockwise ArcMotionX, Y, I, J, R
G3Counter-Clockwise ArcMotionX, Y, I, J, R
G20/G21Units (Inch/mm)SetupNone
G90/G91Absolute/RelativeSetupNone
M3/M5Spindle On/OffMachineS (Speed)
FFeed RateParameterValue (units/min)

Frequently Asked Questions

CNC machines often use a coordinate system where Y+ is "away" from the operator. However, screen coordinates usually have Y+ going "down". This viewer uses standard Cartesian coordinates (Y+ is Up), but if your post-processor assumes a different origin, use the "Flip Y" toggle or check your G-Code generator settings.
Yes. While it optimizes for a Top-Down (2D) view to verify XY paths, it parses Z-heights to calculate layer changes. It distinguishes between extrusion moves (G1 with E parameter) and travel moves.
The viewer uses the standard I/J incremental offset method. It calculates the center point relative to the start position: CenterX = StartX + I. If your G-Code uses "R" (Radius) format, the parser mathematically converts the Radius and Start/End points into a valid arc center.
No. The entire parsing and rendering process happens client-side in your browser using JavaScript. Your proprietary design files never leave your computer.