About this tool

This converter translates YAML into formatted JSON and JSON into YAML, showing the parser's error message if the input is invalid.

How to use it

  1. Paste YAML into the YAML box, or JSON into the JSON box.
  2. Click YAML → JSON or JSON → YAML.
  3. Copy the output.

Good to know

  • Conversion uses the js-yaml library; JSON output is indented with 2 spaces, and YAML output uses 2-space indentation without line wrapping.
  • YAML 1.2 is a superset of JSON, so valid JSON is also valid YAML.
  • YAML comments are lost when converting to JSON, because JSON has no comment syntax.
  • YAML indentation must use spaces; tabs are not allowed.

Runs entirely in your browser — nothing you enter is uploaded or stored.

Frequently asked questions

Why do I get an indentation error?

YAML depends on consistent indentation with spaces. Tabs or misaligned keys cause parse errors.

Are YAML comments kept?

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

Can I convert Kubernetes or Docker Compose files?

Yes. Single YAML documents such as manifests and compose files convert directly.

Is my configuration uploaded?

No. Conversion happens in your browser, so secrets in configs stay on your device.