JSON to YAML Converter

Paste JSON to get clean, properly-indented YAML, or paste YAML to get it back as JSON — both directions validate as you type, so a syntax mistake shows exactly what's wrong instead of a silent failure.

How to use

  1. Choose a direction: JSON → YAML or YAML → JSON.
  2. Paste your data — conversion runs instantly as you type.
  3. Copy the result once it looks right.

FAQ

Does it support YAML anchors, aliases, and comments?

Anchors/aliases parse and resolve correctly. Comments in YAML input are preserved on YAML → JSON only in the sense that JSON has no comment syntax to carry them to — they're dropped in the JSON output, same as any JSON-based tool would do.

What YAML style does JSON → YAML produce?

Block style (indented, one key per line) rather than flow style ({a: 1, b: 2} inline) — block style is the more common, more readable convention for hand-edited YAML files like Docker Compose or GitHub Actions configs.