YAML ⇄ JSON Converter

Convert YAML to JSON and JSON to YAML safely: custom or executable tags are never loaded, alias expansion is limited, and errors show the line and column.

  • Runs in your browser (no upload)
Direction

Up to 2 MB per file

Read safely as YAML 1.2 (core schema), up to 2 MB. Custom and executable tags are never loaded, and alias expansion is limited.

Result

How to use

  1. Choose the direction: YAML → JSON or JSON → YAML.
  2. Paste your data or open a file, and pick the output indentation.
  3. Check the result, then copy or download it. Errors show the line, column and the exact spot.

FAQ

What happens to tags like !!js/function?

Any tag that is not part of the YAML 1.2 core schema is reported as an error; it is never loaded or executed. Standard tags such as !!str and !!int work.

Are anchors, aliases (& and *) and merge keys (<<) supported?

Yes. Conversion stops, however, for data whose aliases expand excessively (such as "billion laughs") or that refers to itself.

Do yes and on become true?

No. Input is read as YAML 1.2, so they stay strings. When converting JSON to YAML, such strings are quoted so older YAML 1.1 tools do not misread them.

Notes & limitations

  • What you enter is processed only on this page and is not sent to YUCTS servers.
  • Input is limited to 2 MB and the converted output to about 20 MB.
  • Comments are not carried over to JSON. Several documents separated by --- become a JSON array.
  • YAML 1.1 type tags such as !!binary and !!timestamp, and custom tags, are not supported.
  • JSON keys are always strings (sequence or mapping keys are written as JSON text). .inf and .nan cannot be expressed in JSON and become null.

Data sources