YAML Formatter
Paste YAML to re-indent it consistently. Errors point to the exact line and column.
Runs in your browser — nothing is uploadedFormatted YAML
How to use YAML Formatter
- Paste YAML or open a .yml file.
- Choose indentation and options.
- Copy the formatted YAML.
Formula & assumptions
- Runs entirely in your browser — your code is never uploaded.
Questions
Are comments kept?
No — the YAML is parsed and written back out, so comments are dropped. Keep a copy if your comments matter.
Why are some strings quoted?
Values that YAML would otherwise read as numbers, booleans or dates are quoted so their meaning doesn’t change.
Can it sort keys?
Yes, alphabetically at every level — handy for diffs and config reviews.