YAML Validator Online
Check YAML for syntax errors and get the line and column where parsing failed, which is usually an indentation mistake rather than a typo.
Browser tool
YAML
Paste YAML or upload a file.
Settings
Multiple documents separated by --- are checked together. Alias expansion is capped at 100 references per document.
About YAML Validator
YAML fails in ways that are hard to see: a tab where spaces were expected, a key indented one space too far, a colon inside an unquoted string. The parser knows exactly where it gave up, and this shows you that position and the reason rather than only reporting that the file is invalid. It also checks every document in a multi-document file separated by ---, the way Kubernetes manifests and CI configs are usually written. Free, online, and usable the moment you arrive. Your YAML is parsed locally, so a file full of credentials is never uploaded, and no account is involved.
How to use YAML Validator
- Paste the YAML or open the fileA whole config or the fragment you suspect.
- Read the position, not just the messageThe line and column are where parsing failed, which is often one or two lines below where the mistake actually is — an under-indented key is only detectable once the next key arrives.
- Fix one error and check againA single indentation mistake can cause several errors further down. Fix the first one reported, re-check, and the rest often disappear with it.
The errors behind most broken YAML files
Tabs used for indentation are forbidden outright ("Tabs are not allowed as indentation"). A value containing a colon and a space, such as title: Note: read this, makes the parser think a second key has started ("Nested mappings are not allowed in compact mappings") — quoting the value fixes it. A key written twice in the same mapping is an error, not an override ("Map keys must be unique"). And a flow list or object opened with [ or { that never closes is reported where the parser runs out of input, which can be far from the bracket you forgot.
Valid is not the same as correct
Some mistakes produce YAML that parses without complaint. Indent the second item of a list one space further than the first — "- a" followed by " - b" — and many parsers, including this one, read it as a single string "a - b" rather than a two-item list. Nothing errors; the application simply receives the wrong data. When a file validates but your program still behaves oddly, open it in the YAML Viewer and look at the structure the parser actually built.
Why indentation is the usual culprit
YAML expresses structure through indentation, so whitespace is not cosmetic: it is the syntax. Sibling keys must start at exactly the same column, list items must line up with each other, and the amount of indentation you choose must stay consistent inside a block. Editors that mix tabs and spaces, or that re-indent pasted text, are the most common source of a file that looks right and does not parse.
What it does not do
- Valid YAML is not correct configuration. This confirms the file parses; whether the keys are the ones your application expects is a question only that application can answer.
- Where a document uses tags or anchors heavily, a parse error can be reported at the point of use rather than at the definition.
- Error wording comes from the parser this page uses. Other tools such as PyYAML or Kubernetes report the same problem in different words, at the same place.
YAML Validator: questions people ask
- Why does my file fail on a line that looks fine?
- Because the error surfaces where the parser could no longer continue, which is usually just after the real mistake. Check the indentation of the lines immediately above the reported position.
- Can I use tabs in YAML?
- No. The specification forbids tab characters for indentation, and an editor silently inserting one is a common cause of a file that looks correct and will not parse.
- What does "nested mappings are not allowed in compact mappings" mean?
- A value on that line contains a colon followed by a space, so the parser reads it as the start of another key. Put the whole value in quotes — title: "Note: read this" — and it becomes a plain string.
- Can a YAML file contain the same key twice?
- Not within the same mapping. Duplicate keys are an error under the YAML specification, even though some older tools silently keep the last one. Rename one of them or merge the two blocks.
- Can the YAML validator fix or reformat my file?
- No, it reports problems and leaves your YAML exactly as written. Each error comes with a line and column so you can correct it yourself, and once the file passes you can download it as JSON. To browse the parsed structure side by side with the source, use the YAML Viewer.
Questions about ToolsVerse itself — privacy, cost, what happens to your files — are answered in the frequently asked questions.
Related tools
The tools people most often need alongside YAML Validator.
Can’t find the tool you need?
Tell us what you’re looking for and we’ll consider adding it.