YAML Validator
Find out why a YAML file will not load, with the line and column of the problem — and catch the duplicate keys that most loaders accept in silence.
Input
YAML- characters
- 0
- lines
- 0
- size
- 0 B
About this tool
The YAML errors that cost the most time are the ones that are not errors. A repeated key is legal in most loaders, which keep the last occurrence and say nothing; a value written as yes is a boolean rather than the string you meant; a list indented one level too far belongs to the wrong parent. The file loads, the deployment goes out, and the wrong value is live.
This validator treats duplicate keys as a failure rather than a warning. That is stricter than the specification requires, and deliberately so — a key you have written twice is a mistake in every real file, and it is one of the few mistakes that changes behaviour without ever announcing itself.
Every document in a stream is checked, not just the first. A manifest whose third document is broken is a broken manifest, and reporting the first one as valid would be worse than useless.
How to use this tool
Paste YAML, or upload a .yaml or .yml file.
Press Validate.
If it fails, use the reported line and column to go straight to the problem.
If it passes, check the summary — document count, top-level shape and nesting depth.
Key features
- Every document in a multi-document stream validated
- Indentation, tab and mapping errors reported with a line and column
- Parser messages rewritten to describe the cause rather than the symbol
- Duplicate keys reported as an error, not silently resolved
- Merge keys and aliases resolved during the check
- Structure summary — document count, top-level kind, nesting depth
Example
Input — YAML
image:
repository: registry.example.test/billing
tag: "2026.04.1"Output — Report
Two keys in the same block are indented differently,
so YAML cannot tell which level they belong to.
Line 3, column 4
Hint: align sibling keys to exactly the same indentation.Good to know
- This is syntax validation. It does not check the document against a JSON Schema or a Kubernetes API version — convert to JSON and use the JSON Schema Validator for that.
- Only the first fatal error is reported, because YAML parsing cannot reliably continue past a structural failure.
- A value that parses as the wrong type — yes becoming a boolean — is valid YAML and is not reported as an error.
Frequently asked questions
Why is a duplicate key an error here when my loader accepts it?
Because it is always a mistake. The specification leaves the behaviour to the implementation and most loaders keep the last value without warning, which means a duplicated key silently discards the first one. Catching it is the reason to run a validator at all.
Why does my file fail on a tab character?
YAML explicitly forbids tabs for indentation, because tab width is ambiguous and the meaning of the document would depend on the editor. Replace leading tabs with spaces.
Does it check my file against a schema?
No. It checks that the YAML parses. If you need to check the resulting structure against a JSON Schema, convert with YAML to JSON and use the JSON Schema Validator.
Are all documents in the file checked?
Yes. Every document between separators is validated, and the report names the document number when something fails.
Your data stays on your device
Your data is processed locally in your browser and is not uploaded to our server. This page keeps working after you go offline, because there is nothing to send.
Related tools
- YAML FormatterDeveloper ToolsNormalise YAML indentation across a whole stream while keeping every comment.YAMLYAML
- YAML to JSONConvertersParse YAML configuration into JSON, with clear errors for indentation mistakes.YAMLJSON
- JSON ValidatorJSON ToolsCheck JSON syntax and get the exact line, column and cause of every failure.JSONReport
- XML ValidatorDeveloper ToolsCheck that XML is well-formed and get the line and column of the first error.XMLReport
- JSON Schema ValidatorJSON ToolsValidate a JSON document against a JSON Schema and see every error.JSON + SchemaReport