JSON ↔ YAML Converter
Convert between JSON and strict YAML 1.2 — locally, instantly.
JSON vs YAML: What Changes
YAML is a superset of JSON. Every valid JSON document is valid YAML, but not vice versa. When converting JSON to YAML, the output is strict YAML 1.2 — a cleaner format for config files because you don't need to quote most strings and objects don't need curly braces.
| JSON | YAML equivalent | Notes |
|---|---|---|
| "hello" | hello | Strings without special chars don't need quotes |
| {"key": "val"} | key: val | Objects become indented key-value pairs |
| [1, 2, 3] | - 1 - 2 - 3 | Arrays become dash-prefixed lists |
| true / false | true / false | Booleans are identical in YAML 1.2 |
| null | null | Null is identical |
| 42 | 42 | Numbers are identical |
Input
{"user":{"id":1,"name":"Alice","active":true,"tags":["admin","editor"]}}Output
user:
id: 1
name: Alice
active: true
tags:
- admin
- editorYAML Gotchas When Converting Back
Warning: In YAML 1.1 (used by older parsers like PyYAML by default), bare words like
yes, no, on, off are parsed as booleans — not strings. This tool outputs YAML 1.2 which does NOT have this problem, but if you paste the output into a YAML 1.1 parser, a key named yes will become true.| YAML value | YAML 1.1 result | YAML 1.2 result |
|---|---|---|
| yes / no | true / false | "yes" / "no" (string) |
| on / off | true / false | "on" / "off" (string) |
| 1.0 | float | float |
| 0755 | integer (493) | string "0755" |
Try It
Interactive — edit the input to see the output update
JSON Input
YAML Output
Frequently Asked Questions
Your files stay on your computer. Dad promised.