Translate between JSON and YAML in either direction
JSON and YAML describe the same shapes of data — maps, lists, strings, numbers, booleans and null — but they look very different. JSON wraps everything in braces, brackets and double quotes, which is fast for machines to parse. YAML throws most of that punctuation away and uses indentation instead, which is far easier for a human to read and edit. This tool parses whichever format you paste into a real in-memory structure and re-serialises it as the other, so the data is identical and only the syntax changes.
The converter is fully indentation-aware in both directions, so nested objects,
lists, lists of objects and objects inside lists all round-trip correctly. It is also
type-safe: when emitting YAML it automatically quotes any string that would
otherwise be misread — for example the string "true" or "3.14" — so the
value survives a trip back to JSON unchanged.
A worked example
This compact JSON object…
{"app":"toolsy","port":8080,"debug":true,"hosts":["a","b"]}
…becomes this clean, comment-friendly YAML:
app: toolsy
port: 8080
debug: true
hosts:
- a
- b How the same values look in each format
| Data primitive | JSON | YAML |
|---|---|---|
| Map / object key | "name": "ada" | name: ada |
| List of scalars | [1, 2, 3] | - 1 on three lines |
| Boolean | true | true |
| Null | null | null |
| Number-like string | "007" | "007" (quoted) |
| Empty list / map | [] / {} | [] / {} |
YAML is the configuration language behind Docker Compose, Kubernetes manifests, GitHub Actions and Ansible, while JSON is the wire format of nearly every REST API. Converting between them lets you lift an API response straight into a config file, or turn a hand-written config into a payload a program can consume — without re-typing it and introducing a stray comma.