JSON ↔ YAML converter
Convert JSON to YAML or YAML to JSON in your browser. Keep large integers exact, copy or download the result, and save a local draft. Free, with no uploads.
Enable JavaScript to use this interactive tool. Paste input, choose options, then copy or download the result, or save it to your notebook.
Details and limits
Convert one document. YAML comments and presentation are not retained; aliases, custom tags, and non-string mapping keys are rejected. Large integers remain exact; decimals that would round are rejected.
Example and common questions
Convert a small JSON object to YAML
- Direction
- json to yaml
{"name":"Maya","ready":true}name: Maya
ready: true
Are comments and formatting retained?
No. Conversion keeps supported data values, but does not retain YAML comments, original formatting or presentation.
Are large numbers preserved?
Integer tokens remain exact, including integers beyond JavaScript’s safe integer range. Decimals that would lose precision are rejected rather than silently rounded. A different application reading the result may handle numbers differently.
Which YAML structures are unsupported?
Aliases, custom tags and non-string mapping keys are rejected. Expand aliases and quote numeric or boolean mapping keys before converting.
Common errors and limitations
Check invalid JSON or YAML syntax, duplicate mapping keys and unsupported YAML structures. JSON input must use strict JSON syntax; comments and trailing commas are not accepted.