JSON ⇄ YAML Converter
Convert between JSON and YAML both ways — paste one and get the other instantly. Handy for config files, Kubernetes manifests and API payloads. Everything runs in your browser, so your data is never uploaded.
More presets
Jump to another preset — each opens its own page ready to go:
How to convert JSON and YAML
- Choose the direction — JSON → YAML or YAML → JSON.
- Paste your document into the input box.
- Copy the converted result from the output box.
About JSON and YAML
JSON and YAML describe the same kinds of structured data — objects, arrays and scalars — in different styles. JSON uses braces and quotes and is the lingua franca of web APIs; YAML uses indentation, is less noisy, and is the usual choice for human-edited configuration like Kubernetes manifests, GitHub Actions and Docker Compose.
Converting between them lets you read an API response as YAML, or turn a YAML config into the JSON a program expects, without rewriting it by hand. This converter parses and re-serializes entirely in your browser, so your configs and payloads never leave your device.
The YAML this tool writes is deliberately plain: expanded block style with no anchors or aliases, so repeated structures are written out in full rather than referenced. That keeps the output readable by people and by tools that only support a YAML subset, and makes diffs predictable. Going the other way, remember that comments are lost — JSON simply has no comment syntax — so keep the original YAML around if the comments matter.
Conversion is also a quick debugging aid. If a config behaves oddly, converting it to JSON shows you exactly how a parser reads it — every implied type, every nesting level made explicit with brackets and quotes. It is an easy way to spot an indentation slip that moved a key into the wrong object, or an unquoted value that was not the string you assumed. Paste in the suspect file and read the structure, not the whitespace.
Frequently asked questions
How do I convert JSON to YAML?
Pick the JSON → YAML direction, paste your JSON, and the YAML appears instantly. Switch the toggle to convert YAML → JSON instead.
Is the conversion lossless?
JSON maps cleanly to YAML and back for objects, arrays, strings, numbers, booleans and null. YAML-only features such as comments and anchors are not represented in JSON.
Why convert between them?
YAML is easier to read and write for config (Kubernetes, CI, Docker Compose); JSON is what most APIs and programs exchange. Converting lets you work in whichever fits the task.
Is my data uploaded?
No. The conversion happens entirely in your browser; nothing is sent to a server.
Why did an unquoted YAML value turn into a boolean or number in JSON?
YAML infers types from unquoted scalars: true and false become booleans, bare digits become numbers, and a lone null (or an empty value) becomes null. The JSON output makes those inferences visible, complete with quotes around whatever parsed as a string. If you meant a literal string — a version number like 1.10, for example — quote it in the YAML source and convert again.