JSON to YAML converter

Convert JSON data into readable YAML.

  • Development
  • 100% free
  • No sign-up
  • Runs in your browser
JSON to YAML converter

What is the json to yaml converter?

The JSON to YAML converter turns JSON data into YAML, the format used by Kubernetes, Docker Compose, GitHub Actions, Ansible and many config files. Objects become indented keys, arrays become dash lists, and strings are quoted only when YAML needs it.

Values such as yes, no, on, off or 1.0 are quoted so they stay strings, avoiding the classic YAML type surprises.

How to use the json to yaml converter

  1. 1Paste valid JSON.
  2. 2Choose 2 or 4 spaces of indentation.
  3. 3Copy or download the YAML.

Features

Readable output

Block style YAML, no unnecessary quotes.

Safe strings

Quotes values that YAML would read as booleans, numbers or null.

Nested data

Any depth of objects and arrays.

Live conversion

The YAML updates while you type.

Frequently asked questions

Is YAML a superset of JSON?

YAML 1.2 is, so JSON is valid YAML, but block style YAML is much easier to read and edit.

Why are some strings quoted?

Without quotes, YAML would read values like yes, on or 1.10 as booleans or numbers.

Are comments kept?

JSON has no comments, so there are none to keep.

Should I use 2 or 4 spaces?

2 spaces is the most common style for YAML files.