Paste YAML on the left and click YAML → JSON, or paste JSON and click JSON → YAML. The output updates as you type, and Swap moves the result back into the input so you can round-trip a document.

YAML parsing uses the js-yaml library, loaded on demand and run locally in your browser. Files with several documents separated by --- are converted to a JSON array, one entry per document.

A few things to keep in mind:

  • YAML comments, anchors and key order quirks do not survive a trip through JSON. Anchors and aliases are expanded into plain values.
  • Unquoted values like yes, on or 1.0 follow YAML 1.2 core schema rules, so yes stays a string and 1.0 becomes a number. Quote values when you need them kept as text.
  • Parse errors show the line and column where the problem starts, which is usually an indentation or tab issue.