YAML Formatter
Paste YAML and get clean, evenly indented output that is easy to read.
How YAML Formatter works
Formats YAML text or file with the indent size you choose. Nested mappings and lists line up evenly, so you can clearly see how your data is built. Comments, key order and quotes stay as they are.
Your YAML is checked before it is formatted. If something is wrong, you see the line and column of the first error. Supports 6 indent sizes: 1, 2, 3, 4, 6 and 8 spaces. Change the size after formatting and the output updates right away.
Input to YAML Formatter
- Paste or type YAML into the input box, or upload a .yaml or .yml file.
- Input must be one valid YAML document. Duplicate keys and bad indents are errors. Several documents split by --- are not supported.
Output from YAML Formatter
- Evenly indented YAML with syntax highlighting and line numbers.
- Copy it, download it as a .yaml file or open it in full screen.
- Short inline lists and mappings like [1, 2] stay on one line. Use YAML Validator for a full check.