YAML Validator
Validate YAML syntax and catch indentation mistakes, tabs and duplicate keys before they break your Docker, Kubernetes or CI config. Errors show the line number. Runs in your browser.
Suggested tools
About YAML Validator
YAML Validator checks YAML syntax and points to the line of the first problem. YAML is sensitive to indentation, which makes small mistakes easy to make and hard to see — a tab instead of spaces, a missing space after a colon, or a list item at the wrong level can break a Docker Compose file, a Kubernetes manifest or a CI pipeline.
Duplicate keys in the same mapping are reported as errors, because they usually mean one value silently overwrites another. Everything runs locally in your browser — the text you paste is never uploaded.
How to use YAML Validator
- Paste YAML or upload a .yaml / .yml file.
- Press Validate.
- Fix the reported line and validate again.
Key features
- Line numbers for syntax errors
- Detects tabs used for indentation
- Reports duplicate keys
- Supports anchors, aliases and merge keys
Example
The third line is indented one space too far.
server: port: 8080 host: localhost
Invalid YAML: bad indentation of a mapping entry (3:8) 1 | server: 2 | port: 8080 3 | host: localhost ------------^
When to use YAML Validator
- Checking Docker Compose, Kubernetes or CI files before pushing them.
- Finding the exact line of an indentation error.
- Catching duplicate keys that silently overwrite each other.
Tips and common problems
- Use spaces, never tabs, and keep the same indent width throughout the file.
- Always put a space after the colon in "key: value".
- Quote values that start with special characters such as *, & or @.
Frequently asked questions
No. YAML indentation must use spaces. Replace tabs with two spaces per level.
It checks YAML syntax, not whether the fields are valid for Kubernetes or Docker. Use kubectl --dry-run or docker compose config for that.
This validator follows YAML 1.2, where yes/no/on/off are plain text. But many tools still use YAML 1.1, where they become booleans — quote such values ("on") if you mean text.