Skip to content
migration.tools
JSON to YAML

JSON to YAML converter

Rewrite JSON as clean YAML for Kubernetes manifests, CI pipelines and OpenAPI specs. Ambiguous strings are quoted so a version like "1.10" doesn't become the number 1.1.

Going the other way? YAML to JSON

JSON

YAML

The result appears here as soon as there is input.

Processed on this device. Nothing you paste or drop is uploaded.

How to use it

  1. 1Paste your JSON or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the YAML or download it. Drop several files to convert a batch into one ZIP.

How JSON becomes YAML

JSON and YAML both describe nested data, so structure carries over directly: objects stay objects, lists stay lists, and key order is kept.

The differences are in the details each format can express — comments, nulls, dates and attributes — and the notes under the output tell you whenever something had to be adapted.

JSON and YAML, briefly

JSON is the default language of web APIs and document databases. It nests objects and arrays to any depth and distinguishes strings, numbers, booleans and null, but has no comments and no date type.

YAML is the configuration format of Kubernetes, Docker Compose, GitHub Actions, Ansible and OpenAPI. It expresses the same structures as JSON with indentation instead of brackets, plus comments and anchors.

Questions

What if my JSON isn't an array of objects?

The converter looks for the list of records inside the document — for example the array under "data" or "items" in an API response — and tells you which one it used. A single object becomes one row.

Will the YAML be valid for Kubernetes or CI configs?

The output is standard YAML 1.2 with two-space indentation, and strings that could be misread — like "yes", "0123" or "1e3" — are quoted so they stay strings. Key order follows the input.

Guides that use this tool