DevToolCase
Sign in Sign in

Convert JSON to YAML

Turn JSON into readable YAML, indented with two or four spaces, and find the exact line of a JSON syntax error.

Share this result

Encrypted in your browser. The key stays in the link, after “#”: only the people you give it to can read it, not even DevToolCase.

The link works for

Sign in for longer links or links without expiry, and to find them in your account.

YAML 1.2: “yes”, “no” and dates stay text, as in most current tools. Comments are not kept in JSON.

Runs entirely in your browser: nothing you type is sent or stored.

Why convert JSON to YAML?

YAML holds the same data as JSON with less punctuation: no braces, no quotes around most strings, and comments allowed. It is the usual format of configuration files: turn an API response or a JSON setting into the start of a Compose file or a Kubernetes manifest.

What the YAML looks like

  • Objects become indented keys, arrays become lines starting with -.
  • Strings YAML would read as something else are quoted, such as 'yes' or '2024-01-01'.
  • Text on several lines is written as a block, after |.
  • Indented with two or four spaces: YAML forbids tabs.

To check a YAML file, convert it back to JSON.

Add this browser’s favorites to your account?

This browser has 0 favorites that your account does not have:

Either way, this browser keeps its favorites: you find them again after signing out.