YAML ⇄ JSON Converter

Convert YAML to JSON and JSON to YAML for Kubernetes manifests, GitHub Actions, Docker Compose and config files, with clear parse errors.

Runs on your device

Result

Results appear here as you type.

What it does

Paste YAML or JSON and choose the direction. Parsing uses the js-yaml library in safe mode, so custom YAML tags that could run code are not supported.

How to use it

  1. Choose a direction.
  2. Paste YAML or JSON.
  3. Copy or download the converted file.

Example

The example fills in realistic values and runs the tool. Select Try an example above to see it.

When it helps

  • Editing CI pipelines.
  • Converting API responses into config.
  • Debugging indentation errors.

Questions

Are YAML comments kept?

No. JSON has no comments, so they are lost when converting to JSON.

Does it support multiple YAML documents?

Yes; documents separated by --- become a JSON array.

More developer tools

See all 25

People also use

Browse all 200 tools