JSON to YAML Converter
Paste JSON and get YAML you can drop into a manifest or a config file. Strings that YAML would misread — "yes", "0123", "a: b" — are quoted for you.
Runs entirely in your browser — nothing you enter here is sent to a server.
Paste JSON and get YAML you can drop into a manifest or a config file. Strings that YAML would misread — "yes", "0123", "a: b" — are quoted for you.
Runs entirely in your browser — nothing you enter here is sent to a server.
JSON and YAML describe the same things — maps, lists, strings, numbers, booleans and null — so any JSON document has an exact YAML equivalent. YAML drops the braces, brackets and most quotes and shows structure through indentation instead, which is why it became the format for files that people edit by hand: Kubernetes manifests, Docker Compose, GitHub Actions, Ansible playbooks, OpenAPI specifications.
The converter writes block-style YAML with two-space indentation and keeps the order of your keys. Its main job beyond reformatting is deciding where quotes are still needed, because unquoted YAML guesses types — and guesses wrong surprisingly often.
"yes", "no", "on", "null", "1.0" and "0123" stay quoted, so they remain strings and do not turn into booleans or numbers.
Values containing : , #, or starting with -, *, &, { or [ are quoted, because YAML would read them as syntax.
Strings with line breaks are written as literal blocks (|), which is far easier to read than \n escapes.
Empty arrays and objects are written as [] and {}, and null as null, so nothing is lost on the way back.
The usual case is an API that returns JSON while your tooling wants YAML: kubectl get … -o json output that should become a manifest in Git, a JSON Schema you want inside an OpenAPI file, a generated configuration that a human now has to maintain. Since YAML 1.2 is a superset of JSON, pasting JSON straight into a YAML file is technically valid — but nobody will thank you for it in code review.
YAML 1.2 is: every valid JSON document is also valid YAML. The reverse is not true — YAML has comments, anchors and multi-line strings that JSON lacks.
Quotes are added only where YAML would otherwise change the meaning: values that look like booleans, numbers or null, and values containing characters that are YAML syntax. Everything else is left plain for readability.
Yes. Keys are written in the order they appear in the JSON. Neither format gives order a meaning, but keeping it makes diffs readable.
No. The conversion runs in your browser, so manifests and configs with secrets never leave your machine.
Upzilla checks your sites, servers and APIs around the clock and alerts you the moment something breaks. 10 monitors free, no card required.