Skip to content
toola.

YAML ⇄ JSON

YAML to JSON and JSON to YAML converter

Convert Kubernetes manifests, CI configs, OpenAPI files and other YAML to JSON, or turn JSON into readable YAML. Syntax errors are reported with the line and column, multi-document YAML becomes a JSON array, and parsing is safe: custom tags are never executed and alias expansion is capped.

Private: your files never leave your device.

Convert

Parsed safely: no custom tags or code are ever run, and aliases are limited.

How was this tool?

How to use YAML ⇄ JSON converter

  1. Step 1: Choose YAML → JSON or JSON → YAML.

  2. Step 2: Paste your text or open a file; the result updates as you type.

  3. Step 3: Copy or download the converted file.

YAML and JSON side by side

YAMLJSON
name: toola{"name": "toola"}
ports: [80, 443]{"ports": [80, 443]}
- a\n- b (a list)["a", "b"]
enabled: true{"enabled": true}
empty: ~ (or null){"empty": null}
# comment(dropped: JSON has no comments)

JSON is valid YAML, so any JSON file can also be read as YAML. Anchors (&a) and aliases (*a) are expanded when converting to JSON.

Frequently asked questions

Is it safe to paste YAML from an unknown source?

Yes. The parser uses the YAML 1.2 core schema only: tags like !!js/function are read as plain text, nothing is executed, and “billion laughs” alias bombs are rejected.

Are comments kept?

JSON has no comments, so YAML comments are dropped when converting to JSON. Converting back won’t restore them.

Why does “yes” stay a string?

In YAML 1.2 only true and false are booleans. Older YAML 1.1 tools also treated yes/no/on/off as booleans, which caused many config bugs.