Converter
YAML to JSON Converter
Paste YAML on the left, get JSON on the right. The conversion is a real YAML 1.2 parse rather than a text rewrite, so nesting, lists and data types come across intact — and if the YAML has a syntax error, the exact line is reported instead of a broken output.
How to convert YAML to JSON
-
1. Get the YAML in
Paste it from a config file, a Kubernetes manifest, a CI pipeline or an Ansible playbook — or drop the file itself onto the input box.
-
2. Read the JSON
Output updates as you type, two-space indented. A syntax error stops the guesswork: you get the line and column that failed instead of a truncated document.
-
3. Copy or download
Copy the result to your clipboard or save it as a .json file. Nothing is uploaded, so a file you would never paste into a random website is still safe here.
What changes on the way from YAML to JSON
| YAML | JSON | Why |
|---|---|---|
| key: value | "key": "value" | JSON requires quoted keys and string values. |
| - one - two | ["one", "two"] | A YAML sequence becomes an array. |
| nested: deep: true | {"nested": {"deep": true}} | Indentation becomes braces; the tree is unchanged. |
| # a comment | dropped | JSON has no comment syntax. |
| &anchor / *alias / <<: | resolved inline | JSON has no references, so aliases expand into values. |
| date: 2026-08-11 | "date": "2026-08-11" | Dates become strings; JSON has no date type. |
| --- (second document) | first document | JSON holds one value per file, so multi-document input is converted one document at a time. |
Why people convert at all
Feeding a JSON-only tool. Package manifests, REST payloads, most JavaScript configuration, and nearly every API expect JSON. YAML is the friendlier authoring format; JSON is what the machine consumes.
Checking that the YAML actually parses. A file that looks fine can fail on a single tab character or an unquoted colon. Converting is a fast way to prove the structure is valid, and the error message tells you where.
Reading a hostile config. Kubernetes and docker-compose files hide a lot in anchors and merge keys. In JSON the expanded result is visible, which makes it easier to see what a deployment really says.