YAML Validator
Validate YAML syntax and find errors
How to Validate YAML
Paste YAML into the editor and it's checked as you type. Syntax errors, duplicate keys at any nesting level, and tabs used for indentation come back with a line number, a column, and a message. Anything that parses cleanly is shown as formatted JSON in the output panel, which is the fastest way to confirm that the structure you got is the structure you meant.
What the validator checks
Three things, in order. Tabs at the start of a line are caught first, because YAML requires spaces and a tab there fails every parser you hand the file to. Then the yaml package parses the document in strict mode with uniqueKeys enabled, which surfaces malformed key-value pairs, broken indentation, and duplicate keys. Whatever survives is serialized back out as JSON, so you can read the parsed structure instead of guessing at it.
Duplicate key detection
Duplicate keys are the ones that hurt. YAML doesn't complain about them. The later value quietly wins, and the config you thought you shipped isn't the config running. Strict mode turns that into an error with a line number. Keys sharing a name under different parents are fine, as they should be, and only a real collision at the same level gets flagged.
Common YAML mistakes
Tabs instead of spaces. A missing colon after a key. Nesting that sits one level off from what you meant, which parses fine and quietly means something else. Duplicate keys. And the subtle one: values that are not the type you assumed. Write version: 1.10 and the JSON panel shows 1.1, because YAML read it as a number. Write country: no and this parser keeps the string "no", but a YAML 1.1 parser on the other end will hand your application false. The error list catches the syntax problems; the JSON output is what catches the rest.
Frequently Asked Questions
Is the YAML Validator free and open source?
Does it catch duplicate keys?
What is the difference between YAML and JSON?
Why does YAML not allow tabs?
About this tool
The YAML Validator is free and open source. It runs entirely in your browser. Your input is never uploaded, stored, or logged. Open the network tab in your developer tools while the tool runs and you can confirm that for yourself. The full source code is on GitHub under the Apache 2.0 license, so you can read the code, file issues, or fork the project. There are no ads, no accounts, and no usage limits. Built and maintained by Jamdesk.
Maintained by Jamdesk · Last reviewed
YAML frontmatter powers your docs
Jamdesk validates frontmatter automatically when you deploy documentation. Start for Free