Web Toolbox

JSON ↔ YAML converter

Runs in your browser – nothing is uploaded.

Convert JSON into YAML, for example to write a Kubernetes manifest, a Docker Compose file or a GitHub Actions workflow, or convert YAML back into formatted JSON.

Choose the direction in the Direction option. Conversion uses the js-yaml library in your browser.

Example

Direction: JSON -> YAML

Input

{"name":"Ada","skills":["maths","code"],"active":true}

Output

name: Ada
skills:
  - maths
  - code
active: true

Frequently asked questions

What happens to a YAML file with several documents?

Documents separated by --- are converted to a JSON array, with one item per document.

Are YAML comments kept?

No. JSON has no comments, so comments are dropped when YAML is converted to JSON.

Does YAML to JSON keep anchors and aliases?

Aliases are expanded into copies of the values they refer to.