Quick answer

YAML has strict rules for keys, values, colons, and quotes.

YAML Bad Syntax

YAML has strict rules for keys, values, colons, and quotes. Invalid characters, missing colons, or malformed flow (brackets/braces) cause the parser to fail.

Common causes

How to fix

Examples

Bad

key:value

Good

key: value

FAQ

When do I need quotes in YAML?
Quote values that contain reserved characters (: # [ ] { } ,) or that might be parsed as numbers/booleans (e.g. yes, no, 1.2).
Is there a space after the colon in YAML?
Yes. key: value requires a space after the colon.

Fix it now

Try in validator (prefill this example)

Related

All tools · Canonical