YAML ↔ JSON Converter
Switch between YAML→JSON and JSON→YAML, then paste your data — the result updates as you type.
What this tool does
This tool converts YAML documents into JSON, or JSON back into YAML, updating the result live as you type. YAML and JSON represent the same kinds of data — maps, lists, strings, numbers, booleans, and nulls — so the conversion is lossless in both directions for standard structures. All parsing happens locally in your browser — nothing is uploaded.
Example use case
Config files for tools like Docker Compose, Kubernetes, GitHub Actions, and Ansible are written in YAML, but application code and APIs usually work with JSON. Paste a YAML config here to get its JSON equivalent for use in code, or convert a JSON object back into the more human-readable YAML format for a config file.
Note on YAML features
Standard YAML 1.1/1.2 features — nested maps and lists, quoted and unquoted strings, multi-line block scalars, comments, and anchors — are all supported. Comments are dropped when converting to JSON, since JSON has no comment syntax.