Convert JSON to YAML

JSON to YAML rewrites a JSON document as YAML, which is easier to read and to edit by hand once a config has been generated. The conversion is done on your device, so a generated deployment manifest with real values in it is not pasted into a third-party form to be reformatted.

How to convert JSON to YAML

  1. Paste your JSON into the input.
  2. Read the YAML output — nesting becomes indentation and arrays become dashed lists.
  3. Copy it into your config file, then add the comments JSON could not carry.

Last updated

Questions

Is YAML always shorter than the JSON it came from?

Usually, because it drops braces, brackets and most quotes. Deeply nested documents can end up harder to follow, since indentation has to carry all the structure.

Will the YAML it produces be valid?

Yes — it is generated from a parsed JSON document, so the structure is well formed. Strings needing quotes to stay unambiguous keep them.