Input
Ready
Lines: 0
Words: 0
Chars: 0
Size: 0 KB
Input statistics are available via the Stats button above this field.
Output
Lines: 0
Words: 0
Chars: 0
Size: 0 KB
Output statistics are available via the Stats button above this field.
Results are provided for informational purposes only and may contain errors. Please verify important information independently. Use of this tool is at your own risk.
What the YAML Validator does
The YAML Validator parses your YAML with a full YAML 1.2 parser and reports the first syntax error with its line and column. Bad indentation, tabs, a missing space after a colon and unclosed quotes are the problems it catches most often.
When the file is valid you can convert it straight away, because the same parser powers the YAML to JSON Converter and the other YAML conversions on this site.
When to use it
- A Docker Compose, Kubernetes, GitHub Actions or GitLab CI file fails to load and the error message is unclear.
- Reviewing an Ansible playbook, OpenAPI file or Helm values file before committing it.
- Checking YAML generated by a script or copied from documentation, where indentation is often lost.
- Teaching or learning YAML: paste an example and see exactly which line breaks the rules.
Worked example
Input
server:
port: 8080
host: localhost
Output
bad indentation of a mapping entry (Line 3, Column 8)
Suggestion: Check indentation carefully (YAML is space-sensitive, no tabs allowed) and quote strings that contain colons, dashes or special characters.Common questions about the YAML Validator
Can this catch a Docker Compose or Kubernetes config error?
It catches syntax errors in those files, such as broken indentation or an unquoted colon. It does not know each tool's schema, so a misspelled key is valid YAML and still needs the tool's own check.
Why are tabs not allowed?
The YAML specification forbids tabs for indentation because their width is ambiguous. Replace them with spaces, usually two per level; most editors can convert them automatically.
When do I need quotes?
Quote a value that contains a colon followed by a space, starts with a special character such as *, & or @, or should stay a string even though it looks like a number or a boolean, for example "yes" or "0123".