Skip to content

JSONYAML

JSON to YAML Converter

Paste JSON, get readable YAML. Instantly, in your browser.

JSON

Paste your JSON here, or drop a file anywhere on the page

YAML

YAML appears here as you type

Free and unlimited · No sign-up · Values that YAML 1.1 would misread are quoted for you, so the output is safe wherever it lands.

Why the output quotes more than you might expect

A JSON string like "no" is unambiguous. Written back out as bare YAML it would become no — which a YAML 1.1 parser reads as the boolean false. The same trap catches "yes", "on", "off", "022" and "12:30".

So this converter quotes any string that either YAML version could interpret as something other than text. The result is very slightly noisier and considerably harder to break — it round-trips through PyYAML, Go, and JavaScript parsers alike.

Ambiguous strings are protected

Only the values that need quoting get it; ordinary text is left bare.

JSON

{
  "country": "no",
  "enabled": "yes",
  "mode": "022",
  "name": "api-server",
  "replicas": 3
}

YAML

country: 'no'
enabled: 'yes'
mode: '022'
name: api-server
replicas: 3

The full list of values that change meaning between versions — and which parsers read which version — is in the guide YAML 1.1 vs 1.2, and the Norway problem.

Frequently asked questions

How do I convert JSON to YAML?

Paste the JSON into the left pane above and the YAML appears on the right as you type; copy it, or press Download to create a .yaml file from it. There’s no sign-up and nothing is uploaded — the conversion runs in your browser. From a terminal, yq -p=json -o=yaml input.json > output.yaml produces the same result. Whatever you use, check how it handles ambiguous scalars: strings such as "no", "yes", "on", "off", "022", and "12:30" have to be quoted in the YAML output or a YAML 1.1 parser will read them back as booleans and numbers. This converter quotes them for you.