YAML Validator
Validate YAML syntax and inspect line numbers for errors.
🔒 Client · OfflineAbout YAML validation
This tool checks that a YAML document has a valid syntax. It marks each error in the editor gutter. Click an error in the list to move the cursor to that position.
Multi-document streams: A stream can hold more than one document. Three dashes (---) separate them. The tool reads every document and names the document that holds an error. One document gives its own JSON value. More than one document gives a JSON array.
Version rules: The tool uses YAML 1.2 by default. YAML 1.1 reads yes, no, on, and off as booleans, and it reads a number with a leading zero as octal. YAML 1.2 keeps those values as text. Change the version control to compare the two.
Duplicate keys: A repeated key does not stop the parse, so the tool reports it as a warning and names the line. The last value wins.
Circular aliases: An anchor that refers to itself makes a structure that JSON cannot hold. The tool gives a clear error instead of an empty result.
Most YAML errors come from the indentation. YAML uses spaces and never a tab. A tab character gives an error that is hard to see, because the two look the same on the screen.
Another common error is an unquoted value that YAML reads as a number or boolean. A version such as 1.10 becomes the number 1.1. Put quotes around a value to keep it as text.