Both directions, live in browser, spec-conformant
{{ error }}
JSON is more compact and universally available — great for APIs and machines. YAML is easier to read and write (indentation, comments) and is preferred for configuration files (Kubernetes, Docker Compose, Ansible, GitHub Actions). Both represent the same data types — so lossless conversion is possible (except comments are lost on YAML→JSON).
YAML has surprising edge cases: `no` and `off` are parsed as boolean false in YAML 1.1 (so a Norwegian language code loses its meaning). `1.0` is a number, `'1.0'` is a string. Time values like `12:00` get converted to seconds. For simple configs YAML is pleasant; for complex structures with many special characters JSON is safer.