JSON to YAML / YAML to JSON

Switch between JSON and YAML for Kubernetes, CI configs, and API fixtures.

When to use this tool

  • Switching a Kubernetes or CI config between JSON and YAML.
  • Prototyping OpenAPI specs quickly in YAML and exporting to JSON.
  • Diff-reviewing YAML for a PR by converting to JSON first.

How it works

  1. Pick the direction (JSON → YAML or YAML → JSON).
  2. Paste the source.
  3. Read the conversion. Errors point to the offending line.
  4. Copy the output.

Privacy: This tool runs entirely in your browser. Your input is not sent to our servers.

YAML anchors and custom tags may not round-trip exactly.

Output

Advertisement

Frequently asked questions

Does YAML support all JSON types?

Yes, but JSON's `null` is emitted as YAML `null`. If your YAML consumer expects the empty string, adjust manually.

How are comments handled?

JSON has no comments, so YAML comments are dropped during YAML → JSON conversion.

Will it detect duplicate keys?

The parser errors on duplicate keys in YAML, matching strict mode. Fix them before retrying.