The JSON pivot
Six formats, one converter. JSON, YAML, XML, TOML, CSV, and TSV each parse into a plain JSON value and each write out from that same value, so picking any input and any output format works, including pairs like TOML to CSV that most converters don’t bother building directly.
Paste data on the left, choose the input format or leave it on Auto-detect, choose the output format, and the result updates as you type. Auto-detect checks for JSON first, then a consistent CSV or TSV column count, then TOML, then falls back to YAML, since YAML’s syntax is loose enough to match almost anything.
Example: JSON to XML
{ "user": { "id": 42, "active": true, "tags": ["admin", "beta"] } }
becomes
<user>
<id>42</id>
<active>true</active>
<tags>admin</tags>
<tags>beta</tags>
</user>
The single top-level key (user) becomes the root element instead of an extra wrapper, and each array entry becomes a repeated sibling element. Numbers and booleans are written as text, since XML has no native number or boolean type, and reading the file back in returns strings.
XML attributes and text nodes
XML has two things JSON doesn’t: attributes and mixed text content. The converter uses the @_name convention for attributes and #text for text content next to child elements, matching how most JavaScript XML libraries represent XML as JSON. <user id="42">Alice</user> becomes { "user": { "@_id": "42", "#text": "Alice" } }.
CSV and TSV shape
CSV and TSV are tables, not trees, so converting into them means deciding what a row is. An array of objects becomes one row per object with the header set to the union of every key seen, in order. A single object becomes one row. Nested objects and arrays flatten into dotted column names such as address.city or tags.0 unless Flatten nested is off, in which case the nested value is written as a JSON string inside one cell.
Going the other way, Header row controls whether the first line becomes object keys or gets read as data, and Coerce types turns cells that look like 42, true, or null into numbers, booleans, and null instead of leaving everything as text.
TOML limits
TOML requires an object at the root; a bare array or a plain string with no key around it can’t convert to TOML directly. TOML also has no null, so any null field is dropped from the output rather than written as an empty value, and the warning strip notes it.
YAML anchors
An anchor (&name) and its alias (*name) let one YAML value reference another so it appears twice without being duplicated in the file. Parsing resolves the alias to a full copy of the anchored value, so the reference itself doesn’t survive a round trip through this converter or through JSON, which has no equivalent concept.
Related tools
For validating or reformatting a single format without converting it, use the JSON formatter, YAML formatter, XML formatter, or TOML formatter. To clean up messy CSV rows before converting them, start with the CSV editor. To query or reshape a JSON value after conversion, the JSON query playground and JSON schema generator pick up where this tool leaves off.