YAML Formatter
Format, validate, and minify YAML — 100% local processing
Input
Output
⌘↵ to format
About YAML Formatter
YAML is used for configuration in Kubernetes, CI systems, and many frameworks. It relies on indentation to express structure, so inconsistent spacing, tabs, or a misplaced dash can change the meaning of a file or make it invalid.
This tool formats YAML with the indentation you choose, minifies it, and validates that it parses, in your browser. Use it to tidy a hand-edited file or to find the line that breaks a configuration.
Common use cases
- Fixing inconsistent indentation in a config file.
- Validating a YAML file before committing.
- Normalizing formatting across a team's files.
- Locating the syntax error that makes a pipeline fail.
Frequently asked questions
- Can YAML use tabs?
- No. YAML indentation must use spaces; tabs cause parse errors.
- Are comments kept when formatting?
- Comment handling depends on the formatter. Check the output if comments matter and keep a backup of the original.
- Why is my string read as a number or boolean?
- Unquoted values such as yes, on, or 1.0 are interpreted by type. Wrap them in quotes to keep them as text.