How to use the YAML Formatter & Validator
- Paste your YAML or open a .yml file.
- Choose the indentation.
- Fix any error shown, then copy or download the formatted YAML.
What does this tool do?
YAML is whitespace-sensitive, so one misplaced space can break a CI pipeline or Kubernetes manifest. The validator points to the line with the problem.
Formatting normalises indentation and quoting while keeping your comments. Sorting keys alphabetically is optional — it removes comments because the document is rebuilt. Everything runs in your browser; nothing you paste is uploaded.
Why use it?
- Errors with line numbers.
- Keeps comments.
- Multi-document files supported.
Privacy
The calculation happens instantly in your browser. The numbers you enter are not sent to our servers or saved. There's no account to create and nothing to install.
Last reviewed by the M2Toolkit team.