YAML formatter
Format YAML with consistent indentation and line width. Invalid YAML is reported with an error, and the tool runs locally in your browser.
YAML input
Formatted YAML
Enter YAML to format.// About this tool
Normalize messy YAML before committing it to a repository or applying it to a cluster. Paste the input and copy the formatted output. The result is ready to commit or apply.
// How to use it
- Paste the YAML to format.
- Choose two or four spaces of indentation.
- Copy the formatted YAML.
// Frequently asked questions
Are comments preserved?
No. The output is regenerated from parsed data, so comments are dropped.
Does it validate YAML?
It parses the input and reports syntax errors; it does not validate against a schema.