How to convert between JSON and YAML
- Choose JSON → YAML or YAML → JSON.
- Paste your configuration or data, open a
.json/.yaml/.ymlfile, or click Sample data. - Check the notes below the editor: when converting to YAML, the tool reports how many string values were automatically quoted to protect them from YAML type inference.
- Copy the output or download it as a
.yamlor.jsonfile.
Strings that must be quoted in YAML
| JSON value | Unsafe YAML | How YAML reads it | Safe YAML output |
|---|---|---|---|
"NO" (Norway) | country: NO | false (YAML 1.1 boolean) | country: "NO" |
"off" / "on" | flag: off | false / true | flag: "off" |
"02134" (ZIP code) | zip: 02134 | 1116 (octal) or 2134 | zip: "02134" |
"3.10" (version) | version: 3.10 | 3.1 (number) | version: "3.10" |
"2026-11-07" | date: 2026-11-07 | Date object | date: "2026-11-07" |
Frequently asked questions
What is the YAML "Norway problem" and how does this converter prevent it?
In YAML 1.1 (still used by many tools and libraries), unquoted words like NO, no, yes, on and off are parsed as booleans (true or false) instead of strings — so Norway's two-letter country code NO becomes false. This converter automatically wraps any string that looks like a YAML boolean, null, number, octal ("02134") or date in double quotes.
Can I convert YAML back to JSON?
Yes. Switch the direction to "YAML → JSON" or press "⇄ Reverse direction", which moves the current output into the input and converts it back.
Are 64-bit numbers and trailing decimals preserved?
Yes. Both JSON → YAML and YAML → JSON use a lossless number representation that keeps numbers as their exact source text, so 64-bit IDs above 9,007,199,254,740,991 are never rounded.
Why does YAML forbid tab characters for indentation?
The YAML specification requires spaces for indentation because different editors display tabs at different widths. If a YAML input uses leading tabs, the converter reports the exact line number.
Is my configuration file uploaded anywhere?
No. Conversion runs entirely inside your browser tab. Kubernetes manifests, Docker Compose files, GitHub Actions workflows and API configs never leave your device.
Last updated .