YAML ↔ JSON Converter

Convert YAML to JSON or JSON to YAML, and check YAML for errors. Nothing is uploaded.

What this does

This converter turns YAML into JSON and JSON into YAML. It is handy for Kubernetes manifests, Docker Compose and GitHub Actions files, OpenAPI specs and app configs. YAML is checked as you type, with the line and column of any mistake such as bad indentation. Files with several YAML documents separated by --- become a JSON array. Your files never leave your browser.

How to use it

  1. Pick YAML → JSON or JSON → YAML.
  2. Paste your text, open a file or drop one onto the box.
  3. Copy or download the result. Press ⇄ to convert it back.

FAQ

Why does my YAML have an error?

YAML is sensitive to indentation: use spaces, never tabs, and line items up exactly. A missing space after a colon or dash is another common cause.

Are comments kept?

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

Is my file uploaded?

No. The conversion runs in your browser, so it is safe for configs with secrets.

YAML engine: js-yaml (MIT).