Home › Guides
G-code and M-code list
The codes you'll see in nearly every program on a Fanuc-style control. Builders differ in the details, so check your machine's manual for options and parameters.
G-codes
| Code | Meaning |
|---|---|
| G00 | Rapid move |
| G01 | Linear move at feed rate |
| G02 / G03 | Circular move, clockwise / counterclockwise |
| G04 | Dwell |
| G17 / G18 / G19 | Plane select XY / XZ / YZ |
| G20 / G21 | Inch / metric units |
| G28 | Return to machine home (reference point) |
| G40 / G41 / G42 | Cutter compensation off / left / right |
| G43 / G49 | Tool length offset on / cancel (mill) |
| G54 – G59 | Work coordinate systems |
| G76 | Threading cycle (lathe) / fine boring (mill) |
| G80 | Cancel canned cycle |
| G81 / G83 | Drilling / peck drilling cycle (mill) |
| G84 | Tapping cycle |
| G90 / G91 | Absolute / incremental positioning (mill) |
| G96 / G97 | Constant surface speed / fixed RPM (lathe) |
| G98 / G99 | Mill: return to initial / R plane. Lathe: feed per minute / per revolution |
M-codes
| Code | Meaning |
|---|---|
| M00 / M01 | Program stop / optional stop |
| M03 / M04 / M05 | Spindle clockwise / counterclockwise / stop |
| M06 | Tool change (mill) |
| M08 / M09 | Coolant on / off |
| M30 | Program end and rewind |
| M98 / M99 | Call subprogram / return from subprogram |
The full reference in your pocket. The app lists G-codes and M-codes, simulates G-code toolpaths, and helps with custom macros, G76 threading and G84 rigid tapping.
Open the G-code list Open the G-code simulator