JSON ↔ YAML converter
Switch between structured data formats.
Enable JavaScript to use this interactive tool. Paste input, choose options, then copy or download the result, or save it to your notebook.
Example and common questions
Move a configuration object between JSON and YAML while keeping supported values exact. This example includes an account ID larger than JavaScript’s safe integer range; keep it as an integer token rather than retyping a rounded value.
How to convert JSON configuration to YAML
- Paste the configuration and select JSON → YAML, or choose YAML → JSON for the reverse direction.
- Choose Convert and inspect the result; comments and YAML presentation are not carried across.
- Copy or download the output, or save it to your notebook to keep it with the original.
Convert configuration with a large account ID
- Direction
- json to yaml
{"service":"orders","port":8080,"accountId":9007199254740993}service: orders
port: 8080
accountId: 9007199254740993
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.