TOOLBOX · CNC & MACHINING · VISUAL TOOLPATH

Free Online CNC Lathe G-Code Simulator

Use this free lathe backplotter and CNC program checker to paste or write G-code and visualise the X/Z toolpath before running it on the machine. X is interpreted as a diameter value; Z is the spindle-length axis.

PROGRAM VIEWER10 moves · G21 metric input · internal preview in mm · 0 tools

01G-code programPaste or edit below
X/Z positioning
02XZ toolpathWork fit · X diameter / radial axis · Z spindle axis
CNC lathe XZ toolpath previewRapid moves are dashed grey, linear feed moves are orange, arcs are light orange, stock is grey and the current tool position is white.Z+X+ DIAX0 Z0
Rapid Linear feed Arc Stock Tool
MOVE10 / 10
LINE / BLOCK17
X DIAMETER (MM)60.000
Z POSITION (MM)10.000
MOTIONG00
FEED0.200 mm/rev
FEED MODEASSUMED · PER REV
POSITIONINGFOLLOW PROGRAM
CURRENT BLOCKG0 X60 Z10
03Program warningsLine-numbered compatibility checks

No basic parser warnings found.

SIMULATED NOW

Motion & modal support

G00 RAPIDG01 LINEARG02 CW ARCG03 CCW ARCG20 INCHG21 METRICG90 ABSOLUTEG91 INCREMENTALG94 PER MING95 PER REVU/W INCREMENTALR + I/K ARCS

Common N, O, T, S, F and M words plus parenthetical and semicolon comments are handled without creating false motion. G18 is the assumed XZ plane.

RECOGNISED · NOT SIMULATED

Complex canned cycles

G71 ROUGHINGG72 FACINGG74 PECKG75 GROOVINGG76 THREADING

These blocks are skipped and reported by line instead of displaying a guessed toolpath. Expand cycles into explicit moves for a visual preview.

PRACTICAL PROGRAM CHECKING

How to use the CNC lathe G-code simulator.

This free browser-based tool turns common two-axis turning moves into an immediate visual check. It is designed to help machinists and CNC programmers understand programmed motion before moving to the control, not to replace the machine’s own graphics and prove-out process.

01 · WHAT IT DOES

From program blocks to a visible path.

Paste a lathe program into the editor and the simulator reads supported X and Z moves, plots the path and shows the active block, tool position, motion mode and feed information. Use playback, single-step controls or the complete toolpath view to inspect the sequence.

02 · X AND Z AXES

See turning motion in the X/Z plane.

The display treats X as the diameter or radial axis and Z as the spindle-length axis. The stock outline and X0 Z0 reference make it easier to spot a move on the wrong side of the component, an unexpected retract or an incorrect sign.

03 · RAPID AND FEED MOVES

Separate positioning from cutting.

G00 rapid moves appear as dashed grey lines. G01 linear feed moves are orange, while G02 and G03 arcs use a lighter orange path. This visual separation helps reveal where the tool approaches, cuts and retracts.

04 · SUPPORTED COMMANDS

Common explicit lathe motion.

The current simulator handles G00, G01, G02 and G03 motion; G20 and G21 units; G90 and G91 positioning; G94 and G95 feed modes; U/W incremental moves; and supported R or I/K arc definitions. N, O, T, S, F and common M words can remain in the program without creating false movement.

CHECKING WORKFLOW

A useful first pass before the machine.

  1. 01

    Paste the program. Keep the original line numbers and comments so warnings are easy to trace.

  2. 02

    Set the stock. Enter a practical diameter and length so the path has useful scale and context.

  3. 03

    Read the warnings. Review unsupported cycles, mixed units and incomplete or unusual blocks.

  4. 04

    Step through motion. Check rapids, feed direction, approach moves, retracts, arcs and the final safe position.

  5. 05

    Verify at the control. Confirm offsets, compensation, tooling and clearances, then use machine graphics, single block, feed override and a safe dry run.

EXAMPLE CNC LATHE PROGRAMS

Start with an explicit toolpath.

Use the built-in example buttons above to load these programs directly into the simulator. Explicit G00, G01, G02 and G03 moves are the clearest way to review motion online.

EXAMPLE 01

Simple profile

Metric absolute positioning with facing, an outside profile and a safe retract.

(EHQ LATHE SIM EXAMPLE)

G21
G90
G0 X52 Z5

G0 Z1
G1 Z0 F0.2
G1 X0

G0 X52 Z2
G1 X50 Z0
G1 Z-30
G1 X40 Z-35
G1 Z-50

G0 X60 Z10
M30
EXAMPLE 02

Arc profile

G02 centre-offset arc motion in the standard G18 X/Z plane.

%
(ENGINEERS HQ ARC PROFILE DEMO)
G21 G18 G90 G95
G50 S2500
T0101
G97 S1200 M3
G0 X42 Z3
G96 S180
G1 Z0 F0.20
G1 X-1.0
G0 X38 Z2
G1 Z0 F0.18
G1 X40 Z-1
G1 Z-18
G2 X34 Z-21 I-3 K0
G1 X30 Z-21
G1 Z-35
G0 X60 Z10
M5
M30
%