1. Home
  2. Coding Tools
  3. YAML ⇄ JSON Converter

YAML ⇄ JSON Converter

Convert YAML configuration files to JSON and JSON back to YAML instantly, with validation and clear error messages. Great for Kubernetes, Docker Compose and CI files.

Runs locally in your browser. Your files and data are never uploaded or stored.

About the YAML ⇄ JSON Converter

YAML and JSON describe the same kinds of data, but different tools prefer different formats. Kubernetes manifests, Docker Compose files, GitHub Actions and OpenAPI specs are usually YAML, while APIs and JavaScript apps use JSON. The YAML ⇄ JSON Converter switches between them in one click.

It validates the input as you type and reports errors with a helpful message, which also makes it a handy YAML validator for catching indentation mistakes. Switching the direction automatically moves the current output to the input box so you can round-trip your data. It uses the widely used js-yaml library, locally in your browser.

How to use the YAML ⇄ JSON Converter

  1. Choose YAML → JSON or JSON → YAML.
  2. Paste your data into the input box.
  3. Fix any reported errors.
  4. Copy or download the converted output.

Frequently asked questions

Are YAML comments preserved?

No. JSON does not support comments, so they are removed when converting YAML to JSON.

Why does my YAML fail to parse?

The most common causes are inconsistent indentation, tabs instead of spaces, and missing spaces after colons.