About this tool
Paste a Kubernetes manifest, a CI workflow or any config file and the tool parses it, points to the exact line and column of any syntax error, and writes it back out with uniform indentation and quoting. Files with several documents separated by --- are handled one by one. Parsing happens in your browser, so secrets in config files stay on your machine.
How to use YAML Formatter
- Paste your YAML into the left box.
- Fix any error shown below, using the line and column given.
- Pick indentation, line width and quoting.
- Copy the result, or switch the output to JSON.
Frequently asked questions
Are my comments kept?
No. The YAML is parsed into data and written out again, which drops comments and expands anchors. Keep a copy of the original if the comments matter.
Why does my value now have quotes?
Strings that would otherwise be read as another type, such as yes, 1.0 or a date, are quoted so they stay strings when parsed again.
Does it validate against a schema?
It checks YAML syntax only. Whether the keys are right for Kubernetes, GitHub Actions or another tool is not checked.