Home › Developer Tools › YAML to JSON Converter

YAML to JSON Converter

Paste YAML (Docker Compose, Kubernetes, GitHub Actions, OpenAPI…) and get the same data as JSON.

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

How to use YAML to JSON Converter

  1. Paste your YAML or open a file.
  2. The JSON 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.

Is there a size limit?

No fixed limit.

Related tools

More Developer Tools