JSON to YAML Converter
Convert JSON to YAML, or YAML to JSON.
Questions
Why did my YAML value no become false somewhere else?
YAML 1.1 read no, off and n as booleans, so the country code for Norway became false. This is known as the Norway problem. YAML 1.2 dropped that rule, and this converter follows 1.2.
Why does "no" come out with quotes?
Many tools still read YAML 1.1, including PyYAML, Ruby's Psych and a lot of Kubernetes tooling. Quoting no, y, on and off costs nothing and stops them turning into booleans.
What happens to anchors and aliases?
Each alias is replaced by a copy of the value, because JSON has no references. An anchor that refers to itself can't be converted and gives an error.
Can it convert a YAML file with several documents?
No. A JSON file holds exactly one value. Instead of dropping the rest, the tool shows an error that points to the line. Split the file at each --- and convert the parts one at a time.
Are my large ID numbers safe?
The JSON side flags any integer too big to keep exactly. The YAML output still holds it as a number, and whatever reads the YAML may round it, so the warning tells you to check it.
Is anything uploaded?
No. The YAML library loads from this site the first time you convert, and converting runs in your browser.
Related tools
- JSON Formatter & ValidatorFormat, minify, check and repair JSON, with errors shown by line and column.
- JSON to CSV ConverterConvert a JSON array to CSV, or CSV to JSON, with nested keys as columns.
- JSON to XML ConverterConvert JSON to XML, or XML to JSON, with attributes and repeated elements handled.
- YAML Formatter & ValidatorCheck YAML and tidy its indentation, with comments kept and errors shown by line.
- TOML to JSON ConverterConvert TOML to JSON, or JSON to TOML, with errors shown by line.