Text and developer tools

YAML ↔ JSON Converter

Convert YAML to JSON and back.

Convert
0 characters

Your text stays on your deviceHow?

Indent

Comments are dropped, because JSON has no comments.

How to convert YAML to JSON

  1. Choose YAML to JSON or JSON to YAML.
  2. Paste your YAML or JSON into the box, and choose the indent.
  3. Copy the result, or fix the error at the line and column shown.

Questions

Which YAML does it read?

YAML 1.2, the current version. Anchors and aliases are resolved, and multi-line strings are joined as YAML describes.

What happens to my comments?

They are dropped. JSON has no comments, so there is nowhere to keep them.

What if my YAML has several documents?

Documents separated by --- become one JSON list, one item for each document.

Why is yes not turned into true?

YAML 1.2 reads only true and false as true and false. Older YAML 1.1 also read yes, no, on and off.

Is my data uploaded?

No. It is converted inside your browser, and never leaves your device.