YAML to JSON Converter
Converted locally with js-yaml 4 (YAML 1.2 core schema). Nothing is uploaded.
Paste YAML and get formatted JSON. Parsing happens on your device, and the converter flags values that different YAML parsers read differently.
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.