JSON to YAML Converter

Convert JSON into clean, valid YAML for config files.

🔒 Runs entirely in your browser. Nothing you enter is uploaded or stored.

What is the JSON to YAML Converter?

YAML is the configuration language behind Kubernetes manifests, Docker Compose, GitHub Actions, Ansible and many CI systems. Every JSON document is also valid YAML, but YAML's indentation style is much easier for people to read and edit. This JSON to YAML converter rewrites your JSON as clean, block-style YAML.

The converter quotes strings that YAML would otherwise misread. In YAML 1.1, the unquoted word no becomes the boolean false (the "Norway problem"). Unquoted 1.0 becomes a number and 2024-01-01 can become a date. Values like these are quoted, so the YAML means exactly what your JSON meant.

How to use the JSON to YAML Converter

  1. Paste valid JSON into the left box (use the JSON Formatter first if you are not sure it is valid).
  2. Click Convert to YAML.
  3. Copy the YAML or download it as a .yaml file.

Frequently asked questions

Why are some of my strings in quotes?

Strings that look like booleans, numbers, dates or null (such as "yes", "1.0" or "2024-05-01") are quoted so YAML parsers keep them as text. All other strings are written without quotes.

Is JSON valid YAML?

Yes. YAML 1.2 is a superset of JSON, so any JSON file is already valid YAML. Converting it simply makes it easier to read and maintain.

Does the converter keep key order?

Yes. Keys appear in the same order as in your JSON.

Can I use the output for Kubernetes?

Yes. The output uses two-space indentation and standard block style, which kubectl, Helm and Docker Compose all accept.