G-code is the common name for the most widely used numerical control program language. G-codes are also called as preparatory codes, and are any word in a CNC program that begins with the letter. G-code programming environments have evolved in parallel with those of general programming from the earliest environments like writing a program with a pencil or typing it into a tape puncher to the latest environment that stack CAD,CAM and richly featured G-code editors.
Generally it is a code telling the machine tool what type of action to perform, such as:
![]() |
| G-code command |
- Controlled feed move in a straight line or arc
- Series of controlled feed moves that would result in a hole being bored,a work piece cut(routed) to a specific dimension,or decorative profile shape added to the edge of a work piece
- Set tool information such as offset
![]() |
| G-code |
![]() |
| G-code program |



