YAML ⇄ JSON Converter
Convert between YAML and JSON in both directions — anchors, block scalars and multi-document streams included — and say so when a conversion loses information.
Runs in your browser: input and output are never sent to the server, and the platform does not store your input.
Output
Fill in the fields on the left, then run.
How to use
- 1Paste YAML or JSON and leave the direction on “Detect automatically”.
- 2Choose a direction explicitly when you need one — for example to reformat JSON as YAML.
- 3Copy or download the result.
FAQ
Why does pasting JSON parse as YAML?
JSON is a subset of YAML 1.2, so any valid JSON is valid YAML. Detection therefore decides what to *emit*: input starting with { or [ becomes YAML, everything else becomes JSON.
Are comments preserved?
Not when converting to JSON — the format has no comments. That is a limitation of JSON, not something the tool drops.
What happens to multi-document YAML (separated by ---)?
JSON has no equivalent, so only the first document is converted and a note tells you how many the source had.
How are YAML's yes and no handled?
Parsing follows YAML 1.2, where yes and no are strings rather than booleans. Toolchains still on YAML 1.1 may differ, so write true / false explicitly if it matters.
Is my data uploaded?
No. Parsing and output both happen in your browser; no sign-in and no quota.
