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.

▶ 3D simulator

Errors–fix before running
Warnings–check these
Hints–
Moves checked–

    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:

    HTML
    <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

    Frequently asked questions

    Does a clean result mean the program is safe?
    No. The checker cannot see your fixture, stock, tool lengths or machine limits. It removes the typical typing and logic mistakes. Simulation, single block and a dry run are still needed.
    Which controls are supported?
    The rules follow Fanuc-style ISO code, which also covers most Haas, Mitsubishi, Mazak EIA, LinuxCNC and GRBL programs. Heidenhain conversational and Siemens high-level code are not supported.
    Is my program stored on your server?
    No. The check runs in your browser. The last program is kept only in your own browser so you can continue later.
    Was this page helpful?