Data converter

YAML to JSON converter

To convert YAML to JSON, drop your YAML file in the box below. It converts straight away; press Download to save the JSON. It all happens in your browser, so your file stays on your device.

Converted on this device, never uploaded

What changes

YAML to JSONWhat happens
ReadsMaps, lists, quoted and plain values, | and > blocks, [flow] and {flow} collections, comments
Several documentsSeparated by ---, they become a JSON array
ValuesYAML 1.2 rules: true/false, null and numbers are typed; yes, no and dates stay text
Not supported yetAnchors and aliases (& *), tags (!), merge keys (<<) and ? keys: refused with the line number
ErrorsNamed with the line, for tabs, duplicate keys and bad indentation

How to convert YAML to JSON

  1. Add your YAML. Drop the file in the box, or click to choose it. It becomes JSON straight away.
  2. Check the result. Look at the preview. The delimiter and value types are set for you; change them if needed.
  3. Download. Press Download to save the JSON.
Why JSON

Turn a YAML config into JSON for a script, an API or a tool that only reads JSON.

Questions

Not yet. A file that uses & or * gets a clear message with the line, rather than a wrong result.

In YAML 1.2, which most current tools use, only true and false are booleans. yes, no, on and off are text.

Documents separated by --- become one JSON array, one item per document.

No. The conversion happens right in your browser, so your file stays on your device. There is no account to make, either.

Related conversions