About the YAML Formatter
YAML’s indentation-based syntax makes small mistakes easy and hard to spot. This YAML validator parses your document with a YAML 1.2 parser, points to the exact line and column of any error, and re-emits clean, consistently indented YAML.
Multi-document files separated by --- (common in Kubernetes) are fully supported, and you can switch the output to JSON to see exactly how a parser interprets your file.
Features
- YAML 1.2 parsing with line & column errors
- Multi-document (
---) support - Normalises indentation and quoting
- Optional key sorting
- Output as YAML or JSON
- Detects duplicate keys
How to use it
- Paste your YAML into the input pane.
- Choose indentation and output format.
- Fix any reported error and copy the cleaned-up result.
Frequently asked questions
Are comments preserved?
No. Like most YAML libraries, the parser discards comments when re-serialising. Validation does not modify your input, so you can use the tool as a pure linter.
Why does “yes” become true?
This tool follows YAML 1.2 where only true/false are booleans. If your output differs, quote the value to make it a string explicitly.
Can it validate Kubernetes resources?
It validates YAML syntax. It does not check Kubernetes API schemas, but syntax errors are by far the most common cause of kubectl apply failures.