There are dozens of G-codes in the standard, but a CNC beginner does not need all of them to start reading programs. A smaller core shows up constantly. Learn this set first.
The motion codes
These command movement and appear in almost every line of cutting:
- G00: rapid positioning (non-cutting). See G00 vs G01.
- G01: linear interpolation, a straight feed move.
- G02: clockwise circular interpolation (arc).
- G03: counterclockwise circular interpolation. See G02 vs G03.
Setup and mode codes
These set up how the machine interprets everything else:
- G17 / G18 / G19: select the working plane (XY, XZ, YZ). G17 is the common default for milling.
- G20 / G21: units, inch (G20) or millimeters (G21). Getting this wrong scales your whole part.
- G90 / G91: absolute (G90) or incremental (G91) positioning.
- G54 to G59: work coordinate offsets, telling the machine where your part zero is.
Reference and compensation codes
- G28: return to the machine reference (home) position.
- G40 / G41 / G42: cutter compensation off, left, and right.
- G43: tool length compensation.
How to learn them
A list like this is a reference, and reading a reference builds recognition, not recall. To actually memorize these, drill them as code-to-meaning and meaning-to-code questions, and put extra reps on the confusable pairs. That is the core of the practice-first method for beginner CNC code. Many beginners get the modal behavior wrong too, so it is worth reading about modal versus non-modal G-codes once these names are familiar.
Then do the same for the machine functions in common M-codes for CNC beginners.
Bottom line
Start with the motion codes, the units and positioning modes, work offsets, and compensation. That dozen covers most beginner programs. Memorize them by recall, not re-reading.
G-Code Sprint is a study and practice tool only. Always follow your instructor, employer, machine manual, and shop safety procedures.