JSON to YAML Converter
Convert JSON to clean, indented YAML in your browser. Handles nested objects, arrays, strings, numbers, booleans and null. No upload, no size limit.
Input JSON
How it works
- Paste JSON and click Convert to YAML.
- Objects become mappings, arrays become sequences, scalars keep their type.
- Ambiguous strings are quoted so they round-trip safely.
- Nothing is uploaded — conversion runs in your browser.
About JSON to YAML
YAML is the human-friendly face of JSON: same data, fewer braces, more whitespace. Converting a JSON payload to YAML makes config files and documentation easier to read, and most tools that accept YAML also accept JSON — so the translation is bidirectional in practice.
Because the tool emits a structural subset (no anchors, aliases, or multi-document streams), the output is predictable and round-trippable. Use it when you want the readable form of a JSON document, not when you need YAML's more advanced graph features.
How the conversion works
The input is parsed with `JSON.parse`, then serialised by a recursive writer that emits block-style YAML: objects become mappings (`key: value`), arrays become sequences (`- item`), and scalars are written in their natural form. Indentation is two spaces throughout, matching the most common YAML convention.
Strings that would otherwise be misinterpreted are double-quoted. Anything that looks like a number, a boolean, or the bare words `true`/`false`/`null`/`yes`/`no` gets quoted so the value you pasted is the value you get back, rather than being silently coerced.
What is and isn't supported
This is a JSON-to-YAML translation, so the output is the faithful YAML image of your JSON: nested objects, arrays of objects, mixed arrays, and `null`. It is the inverse of the existing YAML ↔ JSON converter's JSON direction, with a cleaner hand-written emitter.
It deliberately does not produce anchors (`&`), aliases (`*`), multi-document streams (`---`), or custom tags. Those have no JSON equivalent to translate from, and emitting them would invent structure that was not in your input.
Privacy and limits
Conversion runs entirely in your browser: the JSON is parsed and rewritten by JavaScript, nothing is uploaded, and there is no server call. Because there is no server, there is no artificial size cap — a large document only takes as long as your browser needs.
If the input is not valid JSON, the tool reports the parse error instead of guessing. Fix the JSON and convert again; the YAML side never receives malformed input.
Frequently Asked Questions
What YAML features does this produce?
Will the YAML parse back to the same JSON?
Is my data sent to a server?
Do I need an account or API key?
Can I use these tools offline?
All processing happens in your browser. No uploads, no tracking, no servers. Your API keys, configs, and private payloads stay private — 100% client-side.