YAML Formatter & Validator
Format and validate YAML, and convert it to JSON.
How to format YAML
Paste your YAML
Paste or type your YAML into the box.
Format
The YAML is validated, and the JSON equivalent is shown.
Copy the result
Copy the result, or use it straight away.
When to use YAML Formatter & Validator
A configuration file has inconsistent indentation and needs tidying.
You want to see a YAML document as JSON, for a tool that only accepts JSON.
Tips for a better YAML Formatter & Validator result
Paste the YAML and read the formatted result, with the JSON equivalent shown beside it.
Check indentation first if an error appears, since that is the most common YAML mistake.
YAML Formatter & Validator: limits and what to check
Comments are not part of JSON, so they do not appear in the JSON version.
To only validate the file without reformatting, use the YAML validator.
About YAML Formatter & Validator
Format and validate YAML, and see it as JSON. It is handy for configuration files, where indentation mistakes are common.
FAQs
Can I convert YAML to JSON?
Yes. The JSON version is shown beside the YAML.
Can I only validate it?
Use YAML Validator.