Skip to content

JSON to YAML Converter

Converts JSON into clean, readable YAML for configuration files, Kubernetes and CI pipelines.

Your JSON stays on this device

This tool runs entirely inside your web browser. Your JSON is processed on your own device and is never sent to our servers. How this works

YAML

JSON to YAML Converter is a free tool that turns JSON into clean, readable YAML, the format used by Kubernetes, Docker Compose, GitHub Actions and many other configuration systems. Key order is preserved and strings that need quotes get them. The conversion runs in your browser.

How to convert JSON to YAML

  1. Paste your JSON into the left box, or open a .json file.
  2. The YAML appears on the right. Choose 2 or 4 spaces of indentation.
  3. Copy it, or download it as a .yaml file.

Example

{"service":"web","ports":["80:80"],"environment":{"TZ":"UTC"},"replicas":2}

becomes:

service: web
ports:
  - "80:80"
environment:
  TZ: UTC
replicas: 2

Notice that "80:80" keeps its quotes: without them, some YAML readers would treat it as a number in base 60.

Why use YAML?

YAML describes the same data as JSON, but without brackets, braces and most quotes, and it allows comments. That makes long configuration files much easier for people to read and edit. JSON remains better for data exchanged between programs.

Good to know

Frequently asked questions

Is YAML the same data as JSON?

Yes. YAML is a superset of JSON, so any JSON can be written as YAML with the same meaning. YAML just uses indentation instead of brackets and quotes.

Is key order preserved?

Yes, keys appear in the same order as in your JSON.

Why are some values quoted in the YAML?

Strings that YAML would otherwise read as something else, such as "80:80", "yes" or "1.0", are quoted so they stay text.

Last updated

Missing a feature, or need a tool we don’t have? Suggest it.