Frequently asked questions
How is JSON turned into XML?
Each object key becomes an element with the same name, and its value becomes the element's text or its child elements. Everything is wrapped in one root element, called root unless you choose another name, because an XML document must have exactly one. When the JSON itself is an array, each item becomes an <item> element.
What happens to arrays?
With Repeat the element, {"tag": ["a", "b"]} becomes <tag>a</tag><tag>b</tag>, the style most XML formats use. With Wrap items it becomes <tag><item>a</item><item>b</item></tag>, which keeps empty arrays as empty elements and makes the list easy to spot.
Can I create XML attributes?
Yes. With @keys become attributes switched on, a key that starts with @, such as "@id": "bk101", becomes the attribute id="bk101" on its element, and a "#text" key becomes the element's text. This is the convention many JSON and XML tools share, so the result converts back the same way.
What if a key is not a valid XML name?
XML element names cannot contain spaces or most punctuation, cannot start with a digit and cannot start with "xml". Such characters become an underscore and a bad first character gets an underscore in front, so "in stock" becomes <in_stock> and "2024" becomes <_2024>. A note under the result tells you how many keys were adjusted.
Are special characters handled?
Yes. &, < and > in text are escaped as &, < and >, and quotes in attributes as ", so the XML is always well-formed. The output is UTF-8, so accents and other alphabets stay as they are. Control characters that XML 1.0 forbids are removed, and a note says so.
Can I convert XML back to JSON?
Not here yet. This page converts from JSON to XML only.
Is my JSON uploaded or stored?
No. Everything runs inside your browser, so your data never leaves your device. Our server only records that one operation was converted, along with your network address, so the daily limit shown above the tool can be applied.





