JSON to YAML converter — convert JSON to YAML online
Input
emptyYAML
Every JSON document is already valid YAML
This is the part that surprises people: YAML 1.2 is a strict superset of JSON, so you could rename config.json to config.yaml and most parsers would accept it unchanged. Converting is therefore not about making the document work — it is about making it readable, and about the two things YAML adds that JSON has no form for: comments, and block scalars for long text.
So the honest reason to convert is a human one. A 40-line JSON object with three levels of braces becomes a 40-line YAML document with no braces at all, and once it is YAML you can write a comment next to the setting nobody understands.
Why some strings come out quoted
If your JSON contains "version": "3.10", the YAML here says version: '3.10' — with quotes. Without them YAML would read that value back as the number 3.1, and your version would change. The same applies to "007", "true", "null" and "123".
The quoting is not decoration and it is not removable: it is the only thing keeping the round trip honest. A converter that emitted version: 3.10 would produce a document that looks tidier and holds different data.
Key order is preserved, and never sorted
Keys come out in the order they went in. Some converters sort alphabetically, which is defensible for a data format — JSON objects are formally unordered — but it is the wrong default when the output is a config file a person will read, where grouping is deliberate. The one exception is inherited from JavaScript rather than chosen here: integer-like keys sort ahead of everything else, exactly as they do in the JSON beautifier.
Repeated values are written out in full
YAML can write a value once and refer to it again with an anchor and an alias (&name and *name). Emitters often do this automatically when the same object appears twice, which produces a shorter file containing a feature you never asked for and may not recognise. This converter expands every occurrence instead. The result is longer and says exactly what it means.
Long strings
Long values are kept on one line rather than folded across several. Folding is valid YAML and round-trips correctly, but a string wrapped onto a second indented line scans as a second value to anyone reading quickly — and it only happens where there are spaces to fold at, so similar-looking inputs would behave differently.
Going the other way
The YAML to JSON converter is the reverse, and it has more to say — YAML has anchors, merge keys, multiple documents per file and its own typing rules, none of which JSON can express directly. If your JSON is not parsing in the first place, the JSON validator gives the exact line and column.
Nothing is uploaded
The conversion runs in your own browser. That matters more than usual here, because the documents people convert to YAML are configuration — Kubernetes manifests, CI pipelines, deployment values — and those routinely carry hostnames, bucket names and credentials. Nothing you paste is transmitted, stored or logged.