JSON ↔ YAML Converter
Convert JSON to YAML or YAML back to JSON, either direction, entirely in your browser.
Use the tool ↓About this tool
JSON and YAML describe the same kinds of data — objects, arrays, strings, numbers, booleans — but with very different surface syntax, and each format ended up dominant in different corners of software for reasons that still matter when you're choosing between them. JSON's braces and quotes make it unambiguous and trivial for machines to parse consistently, which is why it won as the format for API payloads and anywhere data crosses between programs automatically. YAML strips almost all of that punctuation in favor of indentation and line breaks, trading some machine-parsing simplicity for something humans read and, especially, hand-edit far more comfortably — which is why it became the default for configuration files: Kubernetes manifests, CI/CD pipelines (GitHub Actions, GitLab CI), Docker Compose, and countless application config files are written in YAML specifically because a person is expected to open and modify them directly.
That difference in intended audience is exactly why converting between the two comes up so often in practice. You might receive a JSON API response and need to hand-write a Kubernetes config that embeds similar structure — converting the JSON to YAML first gives you a readable starting point instead of translating the syntax by hand. Or you're debugging a CI pipeline's YAML and want to see the exact same data as JSON to feed into a script or another tool that expects JSON specifically — converting the other direction closes that gap in seconds.
The conversion itself is mostly mechanical once you know the correspondence: a JSON object becomes a YAML mapping (key: value pairs, indented rather than braced); a JSON array becomes a YAML sequence (each item on its own line, prefixed with a dash); JSON's quoted strings, numbers, booleans, and null map onto YAML's equivalents, with YAML generally not requiring quotes around strings unless they'd otherwise be ambiguous (a string that looks like a number, or contains a colon). Nesting depth becomes indentation depth in YAML, which is also YAML's most common source of hand-editing bugs — an indentation level that's one space off silently changes which object a key belongs to, something this tool sidesteps entirely by generating the indentation programmatically rather than by hand.
Going the other direction, from YAML to JSON, means parsing YAML's more permissive syntax — including its use of significant whitespace, optional quoting, and a handful of type-inference rules (an unquoted yes or no can be interpreted as a boolean in some YAML dialects, for instance) — into JSON's stricter, fully-explicit form. This tool follows standard YAML 1.1-style parsing for the common cases: mappings, sequences, scalars, and basic type inference for numbers, booleans, and null. Everything runs locally in your browser; nothing you paste is transmitted anywhere.
How to use it
Pick a direction
JSON → YAML or YAML → JSON, depending on which format you're starting from.
Paste your data
The conversion updates live as you type or paste.
Check the result
If the input can't be parsed, the status bar explains what went wrong.
Copy the output
Copy the converted result directly into your config file or codebase.
Example
{
"name": "Nesake",
"tools": 15,
"categories": ["JSON", "Security", "Text"]
}name: Nesake tools: 15 categories: - JSON - Security - Text
Common use cases
Writing Kubernetes manifests
Convert a JSON API response into a readable YAML starting point.
CI/CD pipeline configs
Translate between GitHub Actions YAML and JSON for tooling that expects one or the other.
Debugging config files
Convert a YAML config to JSON to spot structural issues more easily.
Docker Compose files
Move between JSON and YAML forms of a compose configuration.
API documentation
Present the same example payload in both formats for different audiences.
Learning YAML syntax
See how familiar JSON structures map onto YAML's indentation-based syntax.