YAML Formatter
Check YAML for syntax errors, normalise its formatting, or convert between YAML and JSON. Multi-document files separated by --- are supported.
YAML output
How to format and convert YAML
- Paste YAML (or JSON, for JSON to YAML) into the input.
- Choose the mode: Format YAML, YAML to JSON or JSON to YAML.
- Read any parsing error with its line and column and fix it.
- Copy or download the output.
Frequently asked questions
Are comments kept when formatting YAML?
Yes, Format YAML keeps comments. Converting to JSON drops them, because JSON has no comments.
Which YAML version is used?
YAML 1.2 via the open-source yaml library. Note that in YAML 1.2, values like yes/no and on/off are strings, not booleans.
What happens with multiple documents?
Format keeps each document. YAML to JSON outputs a single value for one document, or an array when the file contains several.
Related tools
- JSON FormatterPretty-print or minify JSON with clear error locations.
- JSON ValidatorCheck JSON syntax and see exactly where it breaks.
- XML FormatterValidate, pretty-print and minify XML documents.
More in Code & Data.