Home › Developer Tools › JSON to YAML Converter

JSON to YAML Converter

Paste JSON and get tidy, readable YAML for config files.

Open a .json file or paste below
YAML to JSON ⇄

How to use JSON to YAML Converter

  1. Paste your JSON or open a file.
  2. The YAML appears as you type; errors show the line and column.
  3. Copy the result or download it.

YAML and JSON

YAML and JSON hold the same kinds of data: objects (key: value), lists, strings, numbers, true/false and null. YAML is easier for people to read and write and allows comments; JSON is stricter and is what most APIs and programs expect. This converter uses js-yaml with the YAML 1.2 core schema.

Things to know

  • Comments in YAML are dropped when converting to JSON (JSON has no comments).
  • Anchors and aliases (&name / *name) are expanded.
  • Several YAML documents separated by --- become a JSON array.
  • Values like yes and no stay as text under YAML 1.2, and dates become ISO strings.

Frequently asked questions

Is my data uploaded?

No, conversion runs in your browser.

Why is my YAML invalid?

Usually a tab instead of spaces, uneven indentation, or a colon in an unquoted value. The error shows the exact line.

Does key order stay the same?

Yes, unless you choose Sort A–Z.

Is there a size limit?

No fixed limit.

Related tools

More Developer Tools