Free calculator
G-Code Checker — Find Errors in a CNC Program Before the Machine Does
Paste a program for a mill or a lathe. The checker reads it line by line like an experienced colleague and lists what could cause an alarm, a bad part or a crash, with a suggestion for each line.
Your program stays in your browser. The checker knows common Fanuc-style rules; it cannot see your fixture, tools or machine limits.
How it works
Arc check: the distance from the start point to the centre must equal the distance from the end point to the centre, within 0.01 mm. Radius check: R must be at least half of the distance between start and end.
What the checker looks for
- Crash risks: rapid moves below the surface, Z moves without tool length compensation, H numbers that do not match the tool, G28 in absolute mode.
- Alarms: arcs whose end point is not on the circle, radius too small, two motion codes in one block, the letter O instead of zero, open comment brackets.
- Wrong dimensions: coordinates without a decimal point, missing G20 or G21, missing work offset.
- Forgotten codes: no feed, spindle not running, G41 never cancelled, no M30.
This is also a quick way to check a program written by an AI chatbot. After the check, cut it once in the 3D milling simulator or the lathe simulator.
Embed this calculator on your site
Free for workshops, schools and forums — copy this snippet:
<iframe src="https://cnccode.com/embed/gcode-checker/" width="100%" height="720" style="border:0" loading="lazy" title="G-Code Checker"></iframe>More free CNC tools
- Bolt Circle Calculator
- Thread Milling Calculator
- G-Code Generator
- DXF to G-Code Converter
- Text Engraving G-Code
- Feeds & Speeds Calculator
- Drilling Speed & Feed Calculator
- Surface Finish Calculator
- Thread & Tap Drill Calculator
- Chip Thinning Calculator
- Machining Cost & Cycle Time Calculator
- Inch / mm / Fraction Converter
- G-Code Viewer & Simulator
- Lathe Turning Calculator
- All tools