JSON to YAML

Convert JSON to YAML format.

About the JSON to YAML

Paste JSON and get the same data as YAML, ready for Kubernetes manifests, Docker Compose files, CI pipelines or any YAML config.

Everything you enter is processed in your browser; nothing is uploaded or stored.

How to use it

  1. Paste your JSON.
  2. Press Convert to YAML.
  3. Press Copy YAML and paste it into your .yaml or .yml file.

How JSON maps to YAML

YAML is a superset of JSON that uses indentation instead of braces. Each JSON object becomes a block of key: value lines, each array item becomes a line starting with “- ”, and nesting is shown by two extra spaces of indentation.

Numbers, booleans and null keep their meaning. The converter writes nested structures with consistent two-space indentation, which most YAML tools expect.

Example

{"app":{"replicas":2,"ports":[80,443]}} becomes app: replicas: 2 ports: - 80 - 443

Tips

  • YAML forbids tabs for indentation; keep the spaces the converter produces.
  • Strings such as yes, no, on or 0123 can be read as booleans or numbers by some YAML parsers; quote them if needed.

Frequently asked questions

How do I convert JSON to YAML?

Paste the JSON here and press Convert to YAML. The conversion runs in your browser.

Is YAML the same as JSON?

YAML can express everything JSON can, using indentation instead of brackets; valid JSON is also valid YAML 1.2.

Can I convert YAML back to JSON?

Yes, with the YAML to JSON converter.