YAML Validator

Validate YAML in your browser with exact error positions, duplicate key detection and YAML 1.1 versus 1.2 warnings.

Advanced
Ready Paste YAML above and it is validated instantly, right here.
No uploads. Your files stay on your device.

Free forever, no sign-up, no cookies. Buy me a coffee

How it works

Paste YAML and it is parsed on every keystroke by a full YAML parser (js-yaml 5, which implements the YAML 1.2 specification) running inside this page. If the document does not parse you get the exact line and column, the reason, and an excerpt of the offending lines with a caret under the problem, which is the same detail a CI job would print, minutes earlier. Duplicate mapping keys are reported as errors by default, because most loaders silently keep the last one and quietly drop your config. Multi-document files separated by --- are validated document by document.

Beyond plain syntax, the validator flags the values that parse differently depending on which YAML version a tool implements. NO, on and off are ordinary strings in YAML 1.2 but booleans in YAML 1.1 (the famous "Norway problem"); 0755 is seven hundred and fifty-five in 1.2 and four hundred and ninety-three in 1.1; 12:30 can become the integer 750; and 1.10 is the number 1.1, not a version string. Switch the Schema select to YAML 1.1 to see how PyYAML and older Ruby or Java loaders read the very same file. Non-breaking spaces, a byte-order mark, invisible zero-width characters and trailing whitespace are called out too, because they look like nothing at all in most editors and break parsers in confusing ways.

Nothing is uploaded. The parsing happens entirely in JavaScript on your device, so Kubernetes manifests, GitHub Actions workflows, Ansible playbooks and Docker Compose files containing hostnames, tokens or internal URLs never leave your machine.

Frequently asked questions

How do I check a YAML file for errors?

Paste the YAML into the box and it is validated on every keystroke. If it parses you get a Valid YAML verdict plus a structure outline showing the type of every key. If it does not, you get the reason, the exact line and column, an excerpt of the offending lines with a caret under the problem, and a plain-English hint about what usually causes it. Copy report or Download report saves the whole thing as text for a ticket or a pull request comment.

Which YAML version does the validator use?

It parses with js-yaml 5, which implements the YAML 1.2 specification, and the core schema is the default. You can switch the Schema select to YAML 1.1 to see how PyYAML and older Ruby or Java loaders read the same file, or to the JSON and Failsafe schemas for stricter checks. Duplicate mapping keys are reported as errors by default because most loaders silently keep the last one, and you can allow them if that is what your loader does.

Why does it warn about values like NO, 0755 and 12:30?

Because they resolve differently depending on which YAML version a tool implements. Unquoted NO, on and off are ordinary strings in YAML 1.2 but booleans in YAML 1.1, which is how the country code for Norway turns into false. 0755 is the decimal number 755 in YAML 1.2 and octal 493 in YAML 1.1. 12:30 is a string in YAML 1.2 and the base-60 integer 750 in YAML 1.1, and 1.10 is the number 1.1, so a version string loses its trailing zero. Only unquoted scalars are flagged, so quoting the value clears the warning.

Report a bug