JSON to YAML Converter
Converted locally with js-yaml 4 (YAML 1.2 core schema). Nothing is uploaded.
Paste JSON to get clean, block-style YAML with 2- or 4-space indentation. Invalid JSON is reported with the parser's message.
How YAML maps to JSON
- Indented
key: valueblocks become JSON objects;- itemlists and[a, b]become arrays. - Unquoted scalars are typed:
3is a number,truea boolean,nullor~null, and anything else a string. - Comments (
#) and anchors are resolved away: JSON has neither.
Values that surprise people
This converter uses js-yaml 4, which follows the YAML 1.2 core schema. Tools built on YAML 1.1 (PyYAML, older Ruby and Go libraries) still read yes, no, on and off as booleans, so country: NO can turn into false. Versions like 1.10 become the number 1.1 in every parser. Quote such values. When converting JSON to YAML, those strings are quoted for you.
Indentation must use spaces; a tab produces an error with its line and column, shown above the output.
Related guides
Other Number System Conversions
Related numeral systems converters for number conversion between binary, decimal, hexadecimal, octal, and ASCII text.