>_
YML

YAML ⇄ JSON

Convert YAML to JSON and JSON to YAML instantly, with clear error messages. Handy for Kubernetes manifests, GitHub Actions, Docker Compose and OpenAPI specs.

Runs locally — your input never leaves this page.

How to use

  1. Paste YAML or JSON — the input format is detected automatically, or pick a direction yourself.
  2. Choose the indentation. Multi-document YAML (separated by ---) becomes a JSON array.
  3. Copy the result or swap direction to convert back.

FAQ

Is all JSON valid YAML?

Practically yes — YAML 1.2 is a superset of JSON, so any JSON document can be read by a YAML parser. The reverse isn’t true: YAML has comments, anchors and multi-line strings that JSON lacks.

What happens to YAML comments and anchors?

JSON has no comments, so they are dropped. Anchors and aliases (& and *) are expanded into full copies of the referenced data.

Report a bug or suggest a feature →