Developer tool

YAML ⇄ JSON converter

Convert config files both ways: Kubernetes manifests, Docker Compose, GitHub Actions, OpenAPI specs and more.

Advertisement
JSON

Loading the YAML reader…

Advertisement

YAML and JSON in short

YAML and JSON hold the same kind of data. JSON uses braces, brackets and quotes. YAML uses indentation and dashes, which makes it easier for people to read and write. Every JSON file is also valid YAML.

My YAML has several documents separated by ---.

Each document is converted, and the JSON result is a list with one item per document.

Why did my YAML error say "bad indentation"?

YAML only allows spaces for indenting, not tabs, and items at the same level must line up exactly. Check the line shown in the message.

Are comments kept?

JSON has no comments, so YAML comments are dropped when converting to JSON.

YAML is read with the open-source js-yaml library, loaded from a public CDN. Your data still never leaves your browser.

Advertisement