JSON to YAML Converter

Turn JSON into YAML you would actually commit — for Kubernetes, Docker Compose, GitHub Actions or Ansible.

runs in your browserno uploadno sign-up

Paste JSON or load the sample.

YAML output

Output appears here as you type.

What the converter does

Objects become indented mappings, arrays become "- " lists, and scalar values are written plainly wherever that is safe. Strings that YAML would otherwise read as something else — "true", "null", "3.0", "2026-10-01", or text with a leading # or : — are quoted automatically so the data round-trips back to exactly the same JSON.

Lines are never wrapped, so long image names, URLs and base64 values stay on one line and are easy to diff. Choose 2-space indentation (the norm for Kubernetes and GitHub Actions) or 4 spaces.

Frequently asked questions

Is all JSON valid YAML?

Yes — YAML 1.2 is a superset of JSON, so you could paste JSON into a YAML file and it would parse. Converting gives you the idiomatic, more readable block style instead.

Why are some strings quoted in the output?

Because unquoted they would change type. The string "yes", "on", "007" or "1e3" would be read back as a boolean or a number by some parsers, so the converter quotes them to keep your data identical.

Can I add comments?

JSON has no comments to carry over, but you can add # comments to the YAML output by hand once converted.

Is key order preserved?

Yes. Keys appear in the same order as in your JSON.