Free Online YAML Validator
Check YAML syntax and see clear error locations.
The parser accepts one or more YAML documents. Multiple documents are converted to a JSON array.
Validation runs entirely in your browser with js-yaml. Duplicate keys, bad indentation, malformed collections, and invalid anchors are reported with a line and column where available.
About the YAML Validator
YAML is a human-readable data format used for configuration files, deployment manifests, CI pipelines, API specifications, and documentation. It is popular because it is compact and easy to read, but that readability comes with strict indentation rules. A tab where a space belongs, a colon in the wrong place, or a list item with inconsistent indentation can make a file fail to load. This validator parses your YAML and shows exactly where the problem is, so you can fix it before deploying or sharing the file.
Validation uses the js-yaml parser, which supports the YAML 1.2 core schema along with common features such
as anchors, aliases, multi-line strings, and flow collections. When the document is valid, the tool also
converts it to JSON. That makes it easy to move configuration data into a JavaScript application, compare two
files, or inspect the final structure after anchors and aliases have been resolved. Multiple YAML documents
separated by --- are returned as an array, and a single document is returned as one object.
Common YAML mistakes
- Tabs instead of spaces. YAML indentation must use spaces. Tabs are not allowed for indentation.
- Inconsistent indentation. Sibling keys must line up exactly. Two spaces per level is a common convention.
- Missing space after a colon. Write
key: value, notkey:value. - Unquoted special characters. Values containing
:,#, or leading symbols may need quotes. - Duplicate keys. The parser rejects duplicate mapping keys because the result would be ambiguous.
- Broken anchors. An alias must refer to an anchor that was defined earlier in the document.
How to validate YAML
- Paste YAML into the editor on the left.
- Wait for the live check, or press Validate YAML.
- If there is an error, read the message and the line and column badge.
- When the document is valid, copy or download the JSON output.
Frequently asked questions
Does a successful validation mean my configuration is correct?
No. Validation confirms that the YAML syntax is valid and that the document can be parsed. It cannot know whether your application expects a particular key, value type, or structure.
Why are line and column numbers sometimes missing?
The parser reports a location for most syntax errors. A few low-level failures only produce a general message, in which case the tool shows the reason without a position.
Can I convert YAML anchors and aliases to JSON?
Yes. js-yaml resolves anchors and aliases while loading, so the JSON output contains the expanded values rather than the anchor syntax.