YAML Validator
Paste or type YAML to instantly validate, format, and detect errors with line numbers.
Keys may be reordered in the formatted output — this is normal behaviour of the YAML serializer and does not affect validity.
Common YAML Mistakes
- × Tabs instead of spaces — YAML requires spaces for indentation, never tabs.
- × Inconsistent indentation — nested items must align exactly.
- × Missing space after colon —
key:valueis invalid; usekey: value. - × Unquoted special characters — strings with
: # { }should be quoted.
YAML Tips
- ✓ Multi-document — separate documents with
---on its own line. - ✓ Comments — use
#for inline or full-line comments. - ✓ Multi-line strings — use
|(literal) or>(folded) block scalars. - ✓ Anchors & aliases — use
&anchorand*aliasto reuse values.
Frequently Asked Questions
What is YAML?
YAML (YAML Ain't Markup Language) is a human-readable data serialisation format commonly used for configuration files — Docker Compose, Kubernetes, GitHub Actions, and many more.
Why are my keys reordered in the output?
YAML objects are unordered by spec. The js-yaml serialiser may sort or reorder keys — this doesn't change the meaning of the document and the output is still valid YAML.
Does this support multi-document YAML?
Yes. Separate documents with --- on its own line. Each document is validated and formatted individually.
Is my data sent anywhere?
No — all validation happens entirely in your browser using js-yaml. Nothing is sent to any server.