Skip to content
Mediawand

YAML to JSON Converter

Turn YAML from Kubernetes manifests, CI pipelines, Docker Compose files or app settings into JSON for an API, a script or a JSON tool. Errors in the YAML are pointed out with their line and column.

How to convert YAML to JSON

  1. 1Paste your YAML or open a .yaml or .yml file.
  2. 2The JSON appears as you type.
  3. 3Copy it or download it as a .json file.

Several documents

A file with several YAML documents separated by --- becomes a JSON array with one item per document.

No surprise true and false

Words like yes, no, on and off stay text instead of turning into true and false, which avoids a classic YAML trap with country codes like NO.

Anchors and comments

Anchors and aliases are expanded into full copies. Comments are dropped, because JSON can't hold them.

Frequently asked questions

Is my data uploaded?
No. Everything runs in your browser, so the JSON never leaves your device.
Can I convert JSON back to YAML?
Yes. Click Swap, or use JSON to YAML.
Why is my YAML invalid?
Usually a tab used for indentation (YAML needs spaces), a missing space after a colon, or a list item at the wrong indent.

Related tools

Loading tools…