How to use JSON to XML
- Paste your JSON or upload a file.
- Set the root element name if you need something other than root.
- Copy the XML or download it as a .xml file.
About JSON to XML
JSON and XML describe data in different ways, so a conversion has to make a few decisions. Here is what this tool does: every JSON key becomes an element, arrays become repeated elements with the same name, and keys that begin with @_ become attributes. A key called #text holds the text content of an element that also has attributes.
If your JSON has a single top-level key, that key becomes the root element. Otherwise everything is wrapped in the root name you choose, root by default. Keys that are not valid XML names, for example ones that start with a digit or contain spaces, are cleaned up so the output is always well formed.