G-code

G-code (also called GCode or NC code) is the low-level programming language that controls CNC machines. Each line of G-code contains a single instruction to the machine: move to a coordinate, spin the spindle at a certain speed, apply coolant, change tools, etc. G-code is generated by CAM software from a CAD design; it is not written by humans (though machinists can hand-edit it). Most modern CAM software generates G-code automatically, and most modern CNC machines consume it directly.

Why it matters

G-code is the Rosetta Stone between the digital design world (CAD) and the physical manufacturing world (CNC machines). Without G-code, there's no common language between the two. Understanding G-code basics — move (G01), rapid (G00), arc (G02/G03), tool change (T##), spindle speed (S###), feed rate (F##) — helps manufacturers understand what CAM is doing and why a particular design might be slow to machine or require a non-standard tool.

External References

Cite this definition

Finocchiaro, Michael. “G-code.” DemystifyingPLM PLM Glossary, 2026, https://www.demystifyingplm.com/glossary/g-code