JSON to YAML
Turn JSON config into YAML for CI files, Kubernetes manifests and app settings.
How JSON to YAML works
Convert JSON into clean YAML with correct quoting, nesting and indentation. Everything happens inside this page: the tool reads your input, runs the calculation or conversion locally, and hands the result back to you. Nothing is transmitted, because there is no backend to transmit it to.
That design choice is deliberate. Most free tool sites upload your files to a server, process them there, and quietly keep a copy. Toolcin cannot do that — the site is a set of static files. If your connection dropped the moment the page finished loading, every tool would still work.
Why convert at all
JSON and YAML describe the same data — objects, arrays, strings, numbers, booleans, null. JSON is stricter, which makes it safer for machines; YAML is readable, which makes it better for configuration a human will edit.
Converting JSON to YAML is therefore about readability, not capability. Nothing is gained in expressiveness and nothing is lost, as long as the converter handles the ambiguous cases correctly.
The quoting rules that matter
A string that looks like another type must be quoted, or it will be read back as that type. “yes”, “no”, “on” and “off” are booleans in YAML 1.1; a date-shaped string becomes a date; a numeric-looking string becomes a number.
This tool quotes such values so the round trip preserves the original types. Colons, hashes, leading dashes and leading or trailing spaces also force quoting, because each of them changes how the line is parsed.
Indentation is a choice of two or four spaces. Tabs are never emitted — YAML forbids them for indentation, and a file with tabs fails in most parsers with an unhelpful error.
| JSON value | Safe YAML | Why quoted |
|---|---|---|
| "123" | '123' | Otherwise becomes a number |
| "true" | 'true' | Otherwise becomes a boolean |
| "2026-01-01" | '2026-01-01' | Otherwise becomes a date |
| "a: b" | 'a: b' | The colon would start a mapping |
| null | null | Same keyword in both |
What YAML does that JSON cannot
Anchors and aliases, multi-document files and comments have no JSON equivalent, so converting JSON to YAML cannot produce them. Going the other way, those features are lost or expanded.
If you need comments in a config file, write the YAML by hand after the conversion rather than expecting the tool to invent them.
Good to know
- Works offline once loaded, including on flights and in locked-down networks.
- No file size limit beyond your device's own memory.
- Free to use, with no account and no usage counter.
- Results are produced locally, so they are not logged or shared with anyone.
Questions
Why does my string get quoted?
Values that look like numbers or booleans are quoted so YAML keeps them as strings.
Are arrays supported?
Yes, including arrays of objects.
Does it preserve key order?
Yes, keys are written in the order they appear in the JSON source.
Can it read YAML back to JSON?
There is a separate YAML to JSON page for that direction.
Keep going
More files tools
Markdown to HTML
Convert Markdown headings, emphasis, links, lists and blockquotes into clean HTML.
Open toolJSON to XML
Convert a JSON object into well-formed XML with nested elements and escaped values.
Open toolXML to JSON
Convert XML documents into JSON objects, with repeated tags turned into arrays.
Open toolYAML to JSON
Convert YAML configuration into JSON, handling nesting, lists and scalar types.
Open toolCSV to TSV
Convert comma-separated data into tab-separated values for spreadsheets and databases.
Open toolTSV to CSV
Convert tab-separated data into clean, properly quoted CSV, with ragged rows reported instead of silently dropped.
Open tool