Common YAML errors
YAML is more sensitive to formatting than most data formats. Its indentation-based structure means a single misaligned space can change the document's meaning or cause a parse error. The most frequent issues:
- Mixing tabs and spaces — YAML prohibits tabs for indentation. Most editors insert tabs by default; YAML parsers reject them.
- Inconsistent indentation depth — each nesting level must use the same number of spaces. Mixing 2-space and 4-space indentation breaks structure.
- Unquoted special characters — colons, pipes, brackets, and other YAML operators in string values must be quoted.
- Missing space after colon —
key:valueis a bare string in YAML;key: valueis a key-value pair. The space is required.
This validator parses your YAML using the same library used by CI/CD tools and Kubernetes operators. If your YAML passes here, it will pass production parsers.