YAML Validator — Check YAML Syntax Online
- This tool runs entirely in your browser. Nothing you enter or upload is sent to a server.
YAML
Tab indents · Shift+Tab outdents · Esc then Tab moves on
Formatted YAML
Paste YAML to check it
Paste or type on the left, upload a file, or drop one onto the input.
About this tool
The validator parses your text as YAML and lists every syntax error with its line, column and a plain-English hint. It updates as you type, so you can fix a problem and watch the message disappear. When the YAML is valid you also get it back cleanly re-indented, and each document in a multi-document file is checked.
Paste a file to see it. For a compose file with image: node:22 and, a few lines later under the same service, image: node:20, the tool reports Map keys must be unique at line 6, column 5. Other common findings are a tab used for indentation, a line that sits one space off from its siblings (“All mapping items must start at the same column”), a missing closing quote, an unclosed [ or {, and a plain value that starts with @.
Duplicate keys deserve attention: most parsers accept them without complaint and silently keep the last value, so a wrong setting can sit in a file for months. Warnings are shown separately from errors. Words such as yes, no and on are not changed by this tool, but some older YAML 1.1 parsers read them as booleans, so quote them if the meaning matters.
Remember what “valid” means: the text is well-formed YAML. It does not mean the file is correct for Kubernetes, Docker Compose or GitHub Actions, which each check their own fields. If you want the tidied version of valid YAML, use the YAML Formatter above, which keeps your comments. Validation runs locally, so you can paste real configs.
Frequently asked questions
Does this validate against a schema such as Kubernetes or OpenAPI?
No, it checks syntax only. It tells you whether the text is well-formed YAML, not whether the fields are right for a particular tool. Use kubectl, docker compose config or the OpenAPI linter for schema checks.
Why does the error point to a place after the real mistake?
A parser can only notice a problem when it reaches text that does not fit. A missing quote or bracket is often reported on the next line, so check just before the reported position as well as at it.
Are duplicate keys an error?
Yes here. The YAML specification says keys must be unique, but many parsers quietly keep the last one, which hides mistakes. This tool reports the line of the second occurrence.
Is a file with only comments valid?
Yes. A file with only comments, or with nothing but a few blank lines, is valid YAML with an empty document. An empty text box shows nothing until you type.
Can I fix the errors automatically?
Not automatically, because a wrong indent can have more than one correct fix. Each error comes with a hint on what to change, and once the YAML is valid the formatter output is ready to copy.
Is my YAML uploaded anywhere?
No. Checking happens in your browser and nothing you paste is sent to a server.