YAML Validator
Checks that a YAML document parses, and names the line where it stopped making sense.
Loading the tool…
How to use this tool
- Paste the configuration you want checked, or load a .yaml or .yml file.
- Select Check.
- If it fails, go to the reported line. Look first for a tab, then for a value containing a colon and a space, then for a line indented differently from its siblings.
- Fix that one problem and check again — a broken indent usually reports only the first place it went wrong.
What yaml validator does
Almost every YAML failure is an indentation failure, and almost every indentation failure comes from a tab. YAML forbids tabs for indentation outright, and because an editor may render a tab as exactly the width of the surrounding spaces the offending line looks identical to its neighbours. The second most common cause is a value containing a colon followed by a space, which YAML reads as a nested key.
This checker parses the document and, when it cannot, names the line it gave up on. It handles the block style that configuration files are actually written in — mappings, sequences, block scalars, comments, quoted and plain scalars, and inline flow collections. Anchors, aliases and custom tags are refused by name rather than guessed at, because a configuration file that loads wrongly is far worse than one that refuses to load.