JSON to YAML

Turn JSON into YAML that people can read and edit, ready for Kubernetes, Docker Compose, Ansible or any YAML config. The converter quotes strings like "no", "on" or "3" so they keep their meaning, and invalid JSON is reported with the exact line and column.

Data Formats Runs in your browser

Convert JSON to YAML

How to Use the JSON to YAML

  1. Paste the JSON.
  2. Choose indentation, quoting style and key sorting.
  3. Press Convert.
  4. Copy or download the YAML.

About This Tool

DevOps engineers writing manifests, developers converting API output into config files, and anyone who finds YAML easier to review than JSON.

Input: JSON  ·  Output: YAML (.yaml).

Features and Limitations

Features

  • Safe quoting of strings that YAML would otherwise read as booleans, numbers or null.
  • Exact JSON error locations.
  • Warning when numbers exceed JavaScript precision.
  • Long strings are never wrapped.

Limitations

  • Numbers beyond about 15–17 significant digits are rounded by JSON parsing; a warning is shown.
  • Output uses block style; flow style ([a, b]) is not offered.
  • Results are computed in your browser; nothing you enter is sent to a server.

Frequently Asked Questions

Why are some strings quoted?

Values such as "no", "on", "3" or "null" would be read as booleans, numbers or null by YAML parsers, so they are quoted to stay strings.

Is YAML a superset of JSON?

Practically yes for YAML 1.2, so you could paste JSON into a YAML file, but block-style YAML is easier to read and edit.

Can I convert back?

Yes, with the YAML to JSON tool.

Is my JSON sent anywhere?

No. It is converted in your browser.

Related Tools

More like this: all Data Formats tools, all Developer & Web tools or the TinySandy home page.