About the YAML Validator
Check YAML for syntax errors and reformat it cleanly. Errors show the exact line and column, which helps with Docker Compose, Kubernetes, GitHub Actions and other config files.
Key features
- Finds YAML syntax errors with line and column
- Reformats with consistent indentation
- Keeps comments and original quoting
- Multi-document files (---) supported
- Optional key sorting
- Private: config files stay in your browser
Check YAML before you deploy
A single misplaced space can break a Docker Compose file, a Kubernetes manifest or a GitHub Actions workflow. Paste your YAML to find syntax errors instantly, then get a cleanly formatted version.
Common YAML mistakes
| Mistake | Example | Fix |
|---|---|---|
| Inconsistent indentation | 2 spaces in one block, 3 in the next | Use the same number of spaces |
| Tab characters | →key: value | Replace tabs with spaces |
| Missing space after colon | key:value | key: value |
| Unquoted special characters | title: Hello: World | title: "Hello: World" |
| Port numbers like 80:80 | - 80:80 | Quote them: - "80:80" |
Some older YAML 1.1 parsers read unquoted values like 22:22 as base-60 numbers, which is why Docker recommends quoting port mappings.
Related tools
YAML to JSON, JSON to YAML, and JSON validator.
How to use the YAML Validator
- Paste your code into the input box, upload a file, or click Sample to try it out.
- Choose the options you want, such as indentation, line width or dialect.
- The result appears instantly in the output panel. Syntax errors are shown with their line and column.
- Click Copy to copy the result, or Download to save it as a file.