Quick answer: To convert JSON to XML, paste your JSON. Objects become nested elements, arrays become repeated elements and special characters are escaped. You can set the root name and indentation.
How the conversion works
- Each JSON key becomes an XML element.
- Arrays repeat the element once per item.
- Null becomes an empty element.
- Characters such as & and < are escaped, and keys with invalid characters are cleaned.
{"user":{"name":"Ana","tags":["a","b"]}}becomes
<root>
<user>
<name>Ana</name>
<tags>a</tags>
<tags>b</tags>
</user>
</root>Your files stay private. This tool runs entirely in your browser. Nothing you choose or type is uploaded to a server. See our privacy policy.
Frequently asked questions
Why is there a root element?
XML needs exactly one root element. You can rename it.
How are arrays converted?
Each item becomes a repeated element with the same name.
Are attributes supported?
JSON has no attributes, so every value becomes an element.
Is my data uploaded?
No. It is converted in your browser.