JSON to YAML Converter

How it works
Indent
Valid JSON

Input JSON

No problems found. This is valid JSON.

About JSON to YAML

Many tools, from Kubernetes to GitHub Actions, prefer YAML, while APIs and generators usually give you JSON. Paste the JSON and get the same data as YAML, with nesting shown by indentation instead of braces and brackets.

Strings, numbers, booleans, nulls, arrays and nested objects all carry over. The JSON is validated first, so you see any syntax error with its line and column before converting.

How to use it

  1. Paste your JSON into the Input panel.
  2. Check that the Output dropdown says Convert to YAML.
  3. Pick a 2- or 4-space indent.
  4. Copy the YAML, or Download it as a .yaml file.

Frequently asked questions

Will the converted YAML mean the same thing?

Yes. The YAML holds the same values as the JSON. Strings that could be misread as numbers or booleans, such as "1.0" or "true", are quoted so they stay strings.

Is the key order preserved?

Yes. Keys appear in the same order as in the JSON.

Can I convert back?

Yes. Click Use as input, then choose Convert to JSON, or use the YAML to JSON converter.

Related tools