YAML Validator
Check a YAML file before it breaks a deployment. The validator parses the document with js-yaml and reports errors with the exact line and column, rejects duplicate keys and tab indentation, handles files with several documents, and shows the parsed result as JSON. It also warns about values that YAML 1.1 tools read differently, such as NO becoming false or 8080:80 becoming a number.
- Runs in your browser
- No sign-up
- Free to use
How to use YAML Validator
- Paste YAML or open a .yml file.
- Read the error, if any, with its line and column.
- Review portability warnings.
- Check the parsed JSON to confirm the structure.
YAML Validator features
Exact errors
Line, column and reason from a strict parser.
Duplicate keys
Rejected instead of silently overwritten.
Tabs
Detects tab indentation, which YAML forbids.
Multi-document
Files with --- separators, as in Kubernetes manifests.
1.1 pitfalls
Booleans like NO and on, octal 012, versions like 3.10, sexagesimal 8080:80.
Structure view
The parsed document shown as JSON.
When to use YAML Validator
- Checking Docker Compose, Kubernetes or CI files before committing.
- Finding why a pipeline reports a YAML error.
- Spotting values that change meaning between YAML parsers.
- Reviewing configuration written by hand.
YAML Validator FAQ
Why are duplicate keys errors?
The YAML specification requires keys in a mapping to be unique. Many parsers silently keep the last value, hiding mistakes such as the duplicated image key in the sample.
Why can I not use tabs?
YAML defines indentation with spaces only; tabs are not allowed for indentation and cause errors or confusing results.
What are YAML 1.1 pitfalls?
Older parsers, still used by PyYAML, Ruby and many tools, treat yes/no/on/off as booleans, numbers starting with 0 as octal and values like 8080:80 as base-60 numbers. The fix is to quote such values.
Does it validate against a schema?
It checks syntax and structure. For schema validation, convert to JSON and use the JSON Schema Validator.
Can it handle Kubernetes multi-document files?
Yes. Each document separated by --- is parsed and summarised.
Is my file uploaded?
No. Validation runs in your browser.
Getting YAML right
YAML is used for configuration everywhere, from Docker Compose and Kubernetes to GitHub Actions, Ansible and application settings. Its indentation-based syntax is pleasant to read but easy to break: a misplaced space changes the structure, a tab is illegal, and a colon in an unquoted value starts a new key. Errors often surface far from the line that caused them.
This validator parses the text with js-yaml, a strict and widely used implementation, and reports the first problem with its line and column. It rejects duplicate keys, which many tools silently accept by keeping the last one, and checks indentation for tabs, which the YAML specification forbids. Files with several documents separated by --- are parsed document by document.
Valid YAML can still be read differently by different tools. The YAML 1.2 specification, followed by js-yaml, treats only true and false as booleans, but the older YAML 1.1 rules, still used by PyYAML, Ruby’s Psych and many CI systems, also accept yes, no, on and off. The famous result is the country code NO for Norway becoming false. Numbers with leading zeros become octal, and values like 8080:80 become base-60 numbers.
The portability warnings point out these cases line by line and suggest quoting, which makes the value a string in every parser. Version numbers such as 3.10 are flagged too, because as numbers they lose their trailing zero and become 3.1.
Below the report, the parsed first document is shown as JSON. Seeing the structure as data is the quickest way to confirm that nesting, lists and types are what you intended.