JSON to YAML
JSON to YAML turns JSON into the cleaner, indented YAML format that many config files use.
What JSON to YAML does
JSON to YAML turns JSON into the cleaner, indented YAML format that many config files use. It is useful for writing deployment files, turning API examples into settings, or making a long JSON object easier to read.
The YAML appears as you type. Strings are quoted only where YAML needs it, and long text is folded at 120 characters. If the JSON has an error, you see the reason so you can fix it. You can edit the YAML in the result box, then copy it or download it as data.yaml.
How to use JSON to YAML
- Paste your JSON
An object or a list both work.
- Read the YAML
It updates live as you edit the input.
- Save it
Copy the YAML or download data.yaml.
Questions about JSON to YAML
Can I add comments to the YAML?
Yes, after converting. Edit the result and add lines starting with #, then copy or download it.
Why are some strings in quotes?
Values that YAML could misread as a number, a boolean or a date, such as the text 123 or yes, are quoted so they stay text.
Why do I get a JSON error?
JSON is strict: keys need double quotes, and trailing commas are not allowed. The message points to what the parser did not expect.