What is this JSON to XML converter?
A free, browser-based tool that converts JSON to XML as you type. Paste your JSON and the XML appears instantly, ready to copy or download. All processing happens locally in your browser, so your data is never uploaded.
How to use it
- Paste your JSON into the left panel, or upload a JSON file.
- The XML output appears instantly on the right as you type.
- Copy the result or download it as a file.
How the data is mapped
- A top-level object with a single key becomes the XML root element; anything else is wrapped in <root>.
- Keys starting with "@" become attributes, and a "#text" key becomes the element's text.
- Arrays repeat the element name once per item ("item": [a, b] → two <item> elements).
Example
Input (JSON)
{
"order": {
"@id": "1001",
"customer": "Alice",
"item": [
{ "sku": "A-1", "qty": "3" },
{ "sku": "B-2", "qty": "5" }
]
}
}Output (XML)
<?xml version="1.0" encoding="UTF-8"?>
<order id="1001">
<customer>Alice</customer>
<item>
<sku>A-1</sku>
<qty>3</qty>
</item>
<item>
<sku>B-2</sku>
<qty>5</qty>
</item>
</order>JSON vs XML at a glance
| Format | Type | Structure | Best for |
|---|---|---|---|
| JSON | Plain text | Objects, arrays, strings, and numbers | Modern APIs and programming |
| XML | Plain text markup | Nested named elements plus attributes | System integrations, feeds, legacy APIs |


