Skip to content
100% in your browser. Nothing you paste is uploaded — all processing runs locally. Read more →

JSON → YAML Converter

Paste JSON below, get YAML out. Useful for moving data between systems that prefer different encodings (e.g. Kubernetes manifests, Helm values, Hugo / Jekyll front matter).

How the conversion works

JSON's six value types map to YAML directly:

JSONYAML
"hello"hello (quoted only when ambiguous)
4242
true / falsetrue / false
nullnull
[1, 2]- 1
- 2
{"a": 1}a: 1

When to convert

When NOT to convert

YAML's gotchas

YAML is more flexible than JSON, which means it has more ways to be wrong:

The reverse direction (YAML → JSON)

Until we ship a dedicated YAML → JSON page, the simplest tools:

# Python
python3 -c 'import yaml,json,sys; print(json.dumps(yaml.safe_load(sys.stdin)))' < file.yaml

# yq (Go YAML processor)
yq -o=json eval . file.yaml

# Node
node -e 'const yaml=require("yaml");console.log(JSON.stringify(yaml.parse(require("fs").readFileSync(0,"utf8"))))' < file.yaml

FAQ

Is anything sent to a server?

No. Conversion happens in your browser. Open DevTools → Network if you'd like to verify.

What's converted, exactly?

Strings, numbers, booleans, null, arrays, and objects. JSON's primitive types map directly to YAML's. Strings are auto-quoted only when they'd otherwise be parsed as YAML keywords (yes/no/null/etc.) or have special characters.

Can I round-trip JSON → YAML → JSON?

For the data types this tool emits, yes — both encodings represent the same set of primitives. YAML can express things JSON can't (anchors / aliases, custom tags), but converting JSON to YAML doesn't introduce them.

What about YAML to JSON?

Coming soon. For now, run python3 -c 'import yaml,json,sys;print(json.dumps(yaml.safe_load(sys.stdin)))' at the command line.