DataToolsLab
YAML Tools

JSON to YAML

Convert JSON into clean, readable YAML.

Loading tool…

What is JSON → YAML?

The JSON to YAML converter transforms a JSON document into equivalent YAML, saving hours of hand-conversion for Kubernetes manifests, CI configs, and more.

How it works

We parse the input with our hand-rolled JSON tokenizer and serialize with js-yaml. Configurable indent and flow style let you tailor the output.

  1. Paste JSON. Drop a JSON file or paste JSON text. The converter runs on every keystroke.
  2. Configure indent and style. Pick 2 or 4 spaces and Block vs Flow style.
  3. Copy or download. Download as a .yaml file or copy to clipboard.

Examples

Kubernetes config

Paste a JSON spec block and get YAML ready for kubectl apply.

Common mistakes

Comments in the JSON

JSON does not allow comments. Remove any // or /* */ before converting.

Alternatives

YAML to JSON

The reverse direction.

Frequently asked questions

Does it support YAML 1.2?

Yes, js-yaml outputs YAML 1.2, which is what Kubernetes, Docker Compose, and GitHub Actions consume.

Online