JSON to YAML

Converts JSON to YAML: field order and long numbers are preserved, strings like "no" and "0755" get quoted.

Paste JSON or open a file. Field order is preserved, long numbers are not rounded off, and multi-line text is written as a "|" block, line by line.

Which strings get quoted

Those that YAML would read as something other than a string: "no", "on", "true", "null", "0755", "1.10", "8080:80", and dates. The rules come from both YAML 1.1 and 1.2, so the file reads the same in PyYAML and Ansible as in newer parsers.

Multiple objects

If your JSON has one object per line, each line becomes a separate YAML document joined by "---".

Rate this tool

Help us get better

Other tools