---
title: "Common M-Codes Every CNC Beginner Should Know"
description: "A short reference of the M-codes you will meet first: spindle, coolant, tool change, and program control, each with a plain-language meaning."
url: https://gcodepractice.com/journal/common-m-codes-for-cnc-beginners/
canonical: https://gcodepractice.com/journal/common-m-codes-for-cnc-beginners/
author: "Lawrence Arya"
authorUrl: https://www.linkedin.com/in/vibecoding/
published: 2026-05-28
updated: 2026-05-28
category: "Code reference"
tags: ["m-code", "reference", "cheat sheet", "beginner"]
lang: en
---

# Common M-Codes Every CNC Beginner Should Know

> **TL;DR** The core beginner M-codes are M00 and M01 (program and optional stop), M03, M04, M05 (spindle clockwise, counterclockwise, stop), M06 (tool change), M08 and M09 (coolant on and off), and M30 (program end and rewind). Learn this set and you can read most beginner programs.

G-codes command motion. M-codes handle the "miscellaneous" machine functions: turning the spindle and coolant on or off, changing tools, and ending the program. A beginner only needs a small set to start.

## Spindle

- **M03**: spindle on, clockwise (forward).
- **M04**: spindle on, counterclockwise (reverse).
- **M05**: spindle stop.

These three are worth drilling together. See [M03 vs M04 vs M05](/journal/m03-m04-m05/) for the full breakdown.

## Coolant

- **M08**: coolant on.
- **M09**: coolant off.

## Tool change and program control

- **M06**: tool change (usually with a `T` word, like `T02 M06`).
- **M00**: program stop (always pauses).
- **M01**: optional stop (pauses only if the switch is on).
- **M30**: program end and rewind. This is how most programs finish.

```
T02 M06     (change to tool 2)
M03 S1500   (spindle on, clockwise, 1500 rpm)
M08         (coolant on)
...
M05         (spindle stop)
M09         (coolant off)
M30         (end and rewind)
```

## How to remember them

As with any reference, reading the list is not the same as recalling it. Drill these as quick code-to-meaning questions and review the ones you miss, the same [practice-first way you learn the common G-codes](/journal/common-g-codes-for-cnc-beginners/). The whole approach is laid out in [beginner CNC code practice](/journal/beginner-cnc-code-practice/).

## Bottom line

Learn spindle (M03, M04, M05), coolant (M08, M09), tool change (M06), the stops (M00, M01), and the end (M30). That set covers most beginner programs.

*G-Code Sprint is a study and practice tool only. Always follow your instructor, employer, machine manual, and shop safety procedures.*

---

Source: https://gcodepractice.com/journal/common-m-codes-for-cnc-beginners/
Author: Lawrence Arya — https://www.linkedin.com/in/vibecoding/
