JSON

JSON to YAML Converter

Converts JSON into equivalent YAML with the quoting rules YAML actually requires.

Loading the tool…

Processing happens locally in your browser. What you paste or load is processed by this page and is not uploaded to a server. Nothing is stored unless you use a control that says it stores something, and you can clear anything this site has kept from the privacy page.

How to use this tool

  1. Paste the JSON document.
  2. Choose the indentation width.
  3. Select Convert to YAML and check any strings that were quoted for you — those are the values YAML would otherwise reinterpret.

What json to yaml does

YAML is a superset of JSON, so every JSON document has a YAML equivalent. The conversion is mostly mechanical — objects become mappings, arrays become sequences — and the difficulty is entirely in the quoting. YAML will happily read yes, no, on, off, y and n as booleans, and a version number like 1.10 as a float, unless the value is quoted.

This converter quotes any string that YAML would otherwise reinterpret, which is why the output sometimes has quotes you would not have written by hand. That is deliberate: a Kubernetes manifest where the string "no" silently became false is a genuinely hard bug to find, and it is cheaper to carry a few unnecessary quotes.

Frequently asked questions

Because YAML would otherwise change the value. Unquoted yes, no, on, off, true, null and bare numbers are interpreted as booleans, nulls and numbers. Quoting is what keeps the string "no" a string rather than becoming false.

In YAML 1.2, yes — JSON is a subset. Converting is about readability rather than compatibility: the YAML form is indentation-based and easier to review in a pull request.

Yes, with the YAML to JSON converter in the YAML category. Note that YAML features with no JSON equivalent — anchors, multiple documents in one file, and non-string keys — need resolving during that conversion.