Hobby machines running GRBL report problems with two different message families, and both have a number 1. People searching for a GRBL alarm 1 G-code error are usually staring at one of two completely unrelated messages: error:1, a rejected line of code, or ALARM:1, a physical limit hit. The fix depends entirely on which one you have, so start by reading the message exactly.

Which message are you actually seeing?

MessageWhat happenedSeverity
error:1A received line was malformed and was rejectedThe line never ran; the machine keeps working
ALARM:1A hard limit switch tripped during motionMachine halted; position lost; motion locked out

Both lists are published in the GRBL v1.1 interface documentation. The number is just an index within each family; the prefix is the part that matters.

What causes error 1, and how do you fix it?

error:1 is GRBL saying a G-code word did not begin with a letter. Every word in the G-code language is a letter followed by a value, G1, X10.5, F500, and GRBL rejects any line where that grammar breaks, the same letter-plus-value rule behind the question of leading zeros in G00.

The usual culprits, in the order worth checking:

  1. Stray characters in the file: smart quotes, accents, or other non-ASCII characters pasted in from a document editor.
  2. A corrupted line from the serial link: wrong baud rate, a flaky USB cable, or electrical noise garbling bytes mid-stream.
  3. A sender or macro inserting text GRBL was never meant to parse.

The fix is at the file or connection level: open the flagged line in a plain-text editor, retype it cleanly, and if errors appear at random lines on re-runs, suspect the cable and baud rate rather than the program.

What causes ALARM 1, and how do you fix it?

ALARM:1 is physical. A hard limit switch closed while the machine was moving, GRBL slammed to a stop, and because that stop is instant and uncontrolled, the step counters no longer match reality. That is why the alarm locks everything: position is officially unknown.

Recovery is two commands, then a diagnosis:

StepCommandWhy
1. Unlock$XKills the alarm lock so the machine can move
2. Re-home$HRe-finds the switches; position is untrustworthy until then
3. Diagnose(see below)Or the alarm comes straight back

The diagnosis is the real work. Three causes cover almost every case: the work zero was set so the program ran past the machine’s travel; the program itself is larger than the work area; or electrical noise on the limit-switch wiring faked a trigger, a known issue on long unshielded runs that the GRBL configuration guide addresses with wiring practice and the $5 invert setting. Enabling soft limits ($20) with correct travel values ($130 to $132) converts most future overtravels into a polite pre-move rejection, ALARM:2, instead of a physical hit.

A concrete example: a router job homed fine, then threw ALARM:1 ten seconds into the cut. The work zero had been touched off at the far corner of the spoilboard, so the program’s first long X move ran the gantry into the switch. Re-homing and re-zeroing in the middle of the board fixed it; nothing was wrong with the file.

Why do GRBL machines mix these up so often?

Because one hobby machine wears many hats. The same GRBL board drives routers, lasers, and converted printers, the ecosystem covered in OpenBuilds GRBL controller practice, and its operators often come from 3D printing, where firmware behaves differently, the same gap explored in what G54 means in 3D printing. Knowing the standard codes cold is what lets you tell a file problem from a machine problem in seconds.

Bottom line

Read the prefix before the number. error:1 is a malformed G-code word, fixed in the file or the serial link, and the machine is fine. ALARM:1 is a tripped hard limit with position lost: $X to unlock, $H to re-home, then fix the zero, the travel, or the wiring that caused it. Telling the two apart instantly is a recall skill, and a routine on the G-code practice hub builds exactly that.

Sources

Frequently asked questions

What does GRBL alarm 1 mean?

ALARM:1 means a hard limit switch tripped during motion. GRBL halts instantly and locks motion because position is no longer trusted. Unlock with $X, re-home with $H, then find the cause: wrong work zero, a program larger than the travel, or noise faking a trigger.

What does GRBL error 1 mean?

error:1 means a received line was malformed, a word did not begin with a letter, so the line was rejected and never ran. Look for stray non-ASCII characters, a corrupted serial stream, or a sender inserting junk.

How do you clear a GRBL alarm?

Send $X to kill the alarm lock, then $H to re-home, because position is unreliable after a hard-limit halt. Fix the underlying cause or the alarm returns on the next run.

What is the best way to learn the G-code that GRBL machines run?

Drill the core codes with active recall, since GRBL runs a standard subset. A free app like G-Code Sprint quizzes the everyday codes and repeats whichever ones you miss.

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