YAML to JSON Converter

Switch config files between YAML and JSON in one click — handy for Kubernetes, Docker Compose, GitHub Actions and API work.

Loading tool…

How to use the YAML to JSON Converter

  1. Choose YAML → JSON or JSON → YAML.
  2. Paste your data (it converts as you type).
  3. Copy the result or download it as .json or .yaml.

Uses the open-source js-yaml library (YAML 1.2), downloaded once when you open this page.

Frequently asked questions

Are YAML comments kept?

No. JSON has no comments, so they are dropped when converting to JSON. Everything else (keys, lists, numbers, true/false, null) is kept.

What about files with several YAML documents (---)?

They are converted into one JSON array, with one item per document.

Why does my YAML give an error?

Usually because of indentation (YAML needs spaces, not tabs) or a missing colon. The error shows the line and column to look at.

Is my file uploaded?

No. The conversion runs in your browser, so secrets in config files stay on your device.