YAML ⇄ JSON
NewConvert YAML to JSON and back, with error line numbers.
- Runs in your browser
- Data
How to use the YAML ⇄ JSON
- 1Choose YAML → JSON or JSON → YAML.
- 2Paste your input or click Sample (a Kubernetes Deployment).
- 3Copy or save the converted output. Click Flip to convert it back the other way.
Questions
Are YAML comments kept?
No. JSON has no comments, so they're dropped when converting to JSON and can't come back when converting to YAML.
Does it support multi-document YAML (---)?
Not yet. A file with several documents shows an error, so split it and convert each part.
Which YAML version is used?
YAML 1.2, via the open-source yaml library. Some older tools follow YAML 1.1, where values like yes and no become booleans; in 1.2 they stay strings.