This tool converts JSON to YAML and YAML back to JSON entirely in your browser โ nested objects and arrays, strings, numbers, booleans and null all map across correctly, with strings quoted only when needed. Paste on the left, pick a direction, and the result appears on the right to copy or download. Nothing you paste is transmitted anywhere.
JSON and YAML: two views of the same data
JSON (JavaScript Object Notation) and YAML (YAML Ain’t Markup Language) describe the same underlying shapes โ maps of key/value pairs, ordered sequences, and scalar values. JSON uses braces, brackets and quotes; YAML uses indentation and is designed to be easy for humans to read and edit. Because they share a data model, most documents convert cleanly in both directions. JSON is the lingua franca of web APIs, while YAML dominates configuration: CI pipelines, Kubernetes manifests, Docker Compose files and application settings.
A worked example
This compact JSON:
{"name":"QuikConsole","tags":["json","yaml"],"server":{"host":"localhost","port":8080}}
becomes this readable YAML:
name: QuikConsole
tags:
- json
- yaml
server:
host: localhost
port: 8080
Switch the mode and the same YAML converts straight back to formatted JSON. Values and their types are preserved: 8080 stays a number, true stays a boolean, and a quoted "123" stays a string.
How scalars and quoting are handled
Type mapping is the part most naive converters get wrong. When emitting YAML, a string that looks like a number, a boolean, a null, or a reserved word is automatically quoted so it survives a round-trip. So the JSON string "true" is written as 'true' rather than the bare word true, which YAML would otherwise read as a boolean. Strings with leading or trailing spaces, colons followed by a space, leading indicator characters, or the # comment sequence are quoted for the same reason. Everything else stays unquoted for readability.
What is supported, and what is not
Being honest about scope matters more than pretending to handle everything. The parser covers the common YAML subset:
| Supported | Out of scope (reported, not mangled) |
|---|---|
| Nested block maps and sequences | Anchors and aliases (& and *) |
| Flow collections: [1, 2] and {a: 1} | Explicit type tags (!!str, !!int) |
| Single- and double-quoted scalars | Merge keys (<<) |
| Comments and a single — marker | Multi-document streams (many —) |
| Literal | and folded > block scalars | Non-string mapping keys |
If the input uses an unsupported feature, the tool stops and names it โ for example “YAML anchors (&name) are not supported” โ instead of quietly producing wrong output. That way you always know whether the result can be trusted.
Common pitfalls
- Tabs for indentation โ YAML forbids them. The tool converts leading tabs to spaces to be forgiving, but spaces are safest.
- Unquoted special values โ
color: #fffis read as a comment and an empty value; writecolor: "#fff". - Ambiguous strings โ words like
yes,no,onandoffare treated as booleans in many YAML tools; quote them if you mean the literal text. - Trailing commas โ valid in neither JSON nor YAML flow collections; remove them.
Is it safe to paste sensitive data here?
Yes โ this converter never sends your input anywhere. Both the YAML emitter and the parser are plain JavaScript running on your device, with no server round-trip and no third-party code on the page. For the most sensitive configuration you can load the page once and then work offline, or read the source to verify the behaviour yourself.