YAML ↔ JSON
Convert YAML to JSON and back. Multiple documents and anchors are called out.
Added 2026-10-24
What it does
YAML to JSON converts one direction at a time in this tab. Several YAML documents become one JSON array. Anchors and aliases are expanded, and the page says so. A cycle, or an alias expansion that grows too far, stops instead of hanging the tab. YAML 1.2 leaves the merge key as a normal key named <<. It also treats yes, no, and bare dates as strings unless you quote or tag them otherwise. Integers larger than 2^53 - 1 keep their digits. The page does not run a YAML 1.1 parser, so a document that used yes to mean true will not match that old reading. The text is not uploaded.
How to use it
- Paste YAML or JSON. The text stays in this tab.
- Choose the direction. Multiple YAML documents become a JSON array.
- Anchors and aliases are expanded, and a note says so. A loop or a huge alias expansion stops instead of hanging.
Common mistakes
- Merge keys stay as keys. YAML 1.2 does not expand <<. It is kept as a normal key named <<.
- yes and no are strings. In YAML 1.2, yes, no, and dates are strings unless you quote or tag them otherwise.
Conversion stays in this tab. The text is not uploaded.
Related guides
- JSON integers past 2^53
Why JSON.parse rounds large integers, and how to keep every digit when you only need to format JSON.