Skip to content

JSON to YAML

Convert JSON to YAML.

Loading…

About JSON to YAML

Configuration files are often written in YAML while the data you start from is JSON. There is no Convert button here: the YAML panel updates on every keystroke, so you can paste, tweak a value and watch the result change. Nested objects and lists are indented with two spaces, empty containers become [] and {}, and multi-line strings are written as block literals. Anything that YAML might read as a boolean, number or date is quoted.

Features

  • Output updates on every keystroke, with no button to press
  • Strings such as yes, on, null or 1.0 are quoted so they stay strings
  • Multi-line strings are written as block literals
  • Two-space indentation for nested objects and lists
  • Number literals are copied exactly as written
  • Empty arrays and objects are written as [] and {}

Limitations

  • Keys keep their JSON order, and there are no options to sort them or change the indentation.
  • The output is plain block-style YAML; it does not add comments, anchors or tags.
  • Download saves the text as output.txt and needs a free account; Copy Output does not.
  • JSON nested more than 1,000 levels deep is refused.

How it works

  1. Paste your JSON into the JSON Input panel.
  2. Read the YAML Output panel, which updates as you type or edit.
  3. If the JSON has a syntax error, read the error message in the middle column and fix the input.
  4. Use Copy Output to copy the YAML, or Download to save it.
  5. Press Clear All to empty both panels.

Example input

{
  "name": "Auro",
  "tags": ["json", "yaml"],
  "active": true
}

Frequently asked questions