JSON to YAML Guide: Maps, Lists and Quoting
Learn how JSON nesting becomes YAML indentation, and when strings need quotes.
What is the JSON to YAML Converter?
This tool walks a JSON value recursively and writes maps as key: value lines, nested maps indented by two spaces, and arrays as dash lines. Plain strings are written as-is when they contain only letters, digits, spaces and a few safe punctuation marks; anything else is written as a quoted string, so colons and special characters cannot be mistaken for YAML structure. Null becomes null, and empty objects and arrays become {} and [] so no information is silently dropped.
How to use it
- Paste your JSON into the box.
- Click Convert to YAML.
- Copy the YAML result.
Worked example
For the sample, the result is YAML with a user map containing name Ava and age 28, followed by a tags list with dash lines for dev and js.
Is YAML just indented JSON?
Not quite. YAML adds features like comments and anchors, but for plain maps, lists and scalars the two formats describe the same data.
Frequently asked questions
Why are some strings quoted?
Because a string containing a colon, a hash or other YAML-special characters could be misread as structure, so quoting keeps it safely a string.
What happens to empty objects and arrays?
They become {} and [], so an empty value is still visible instead of disappearing.