JSON to YAML Converter

Converted locally with js-yaml 4 (YAML 1.2 core schema). Nothing is uploaded.

Local, round-trip safe

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

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

FAQ

Frequently Asked Questions

Will the YAML convert back to the same JSON?
Yes for JSON input: js-yaml quotes any string that would otherwise be read as a number, boolean or null, so loading the YAML gives the original data.
Are comments preserved?
JSON has no comments, so there are none to carry over. Add them in the YAML afterwards with #.
What indentation is used?
Two spaces by default; you can switch to four. YAML forbids tabs for indentation.
Copied to clipboard!