YAML to JSON / JSON to YAML
Paste YAML or JSON below and convert to the other format.
About YAML and JSON
YAML and JSON are both used for configs and API payloads. YAML is more readable for humans; JSON is ubiquitous in APIs. This tool converts between them in your browser using the js-yaml library so your data stays private.
Frequently Asked Questions
Which direction can I convert?
Both. Paste YAML and click "YAML to JSON" to get JSON. Paste JSON and click "JSON to YAML" to get YAML. The tool auto-detects invalid input and shows an error.
Is my data sent to a server?
No. Conversion uses the js-yaml library in your browser. Your data never leaves your device.
Why does YAML to JSON sometimes change key order?
JSON objects do not guarantee key order. The converted JSON is valid; some parsers may reorder keys. For round-trip consistency, use simple keys.