Paste JSON and get clean, valid YAML in one step, with 2 or 4 space indentation and optional key sorting. The conversion runs entirely in your browser, so your data never leaves your device.
No installation, no signup. Results in milliseconds.
JSON and YAML describe the same thing: objects, arrays, and scalar values. YAML is a superset of JSON, so every valid JSON document is already valid YAML. What the converter does is rewrite the syntax into YAML's block style, where structure is shown by indentation rather than by braces and brackets. The data is identical; only the way it is written on the page changes.
People read YAML. Kubernetes manifests, Docker Compose files, and CI pipelines are written in YAML because the indented form is easier to scan and comment than a wall of braces. When you have a JSON payload from an API and need it as a config file, converting to YAML gets you there without hand-editing.
The converter parses your JSON into data, then serializes that same data as YAML. Nothing is interpreted or dropped along the way, so converting back with the YAML to JSON converter returns your original document. If the JSON will not parse, you get the error instead of broken output; the JSON parser pinpoints the exact character.
Every JSON construct has a direct YAML equivalent. Here is what the converter writes for each.
| JSON | YAML output | Notes |
|---|---|---|
| Object | key: value block | Each pair on its own line, children indented under the parent. |
| Array | - item sequence | One dash per element, indented under its key. |
| Array of objects | dash then keys | Each item is a - followed by that object's keys. |
| String | bare or quoted | Quoted only when needed to keep it a string, such as '3'. |
| Number | 42, -3.14 | Written bare, unquoted. |
| Boolean | true / false | Lowercase, unquoted. |
| null | null | Written as the null literal. |
YAML reads an unquoted value by what it looks like, so a bare 3 is a number and a bare true is a boolean. When your JSON has the string "3" or "true", the converter quotes it in the output as '3' or 'true' so it stays a string and the type survives the round trip. A leading-zero value like a ZIP code "01234" is quoted for the same reason. This is correct behavior, not noise: it is how YAML preserves the exact type your JSON declared. For the format underneath both, see what JSON is.
A nested JSON response becomes a readable YAML config with one conversion.
The nested env object became an indented block, the ports array became a dashed sequence, and the number, boolean, and null values carried over unquoted. Paste the result into the YAML formatter if you want to re-indent it to 4 spaces or sort keys, and read the full walkthrough in how to convert JSON to YAML.
YAML is the config language of modern infrastructure, and most data starts life as JSON.
Everything developers ask about converting JSON to YAML.
Hands-on articles from our blog.
All free, all browser-based, no signup required.