JSON to XML
Turn JSON into readable, indented XML. Arrays become repeated elements, keys starting with @ become attributes, and you choose the root element.
INPUT
OUTPUT
Runs entirely in your browser. Nothing you enter is sent to a server.
How to convert JSON to XML
Paste the JSON
Paste an object or an array, or open a .json file.
Name the root
XML needs a single root element. Enter the name your system expects, or keep root.
Copy the XML
Copy the result or download it as an .xml file.
How JSON maps to XML
Each key becomes an element. An array repeats its parent element once per item, a key starting with @ becomes an attribute, and #text sets the element's text, the same rules XML to JSON uses.
Names XML doesn't allow
Element names can't contain spaces or start with a digit. Such characters are replaced with underscores, so the output is always well-formed.
Frequently asked questions
What happens to null values?
null becomes an empty element, such as <note/>.
How are special characters handled?
& < > and quotes are escaped automatically, so text and attribute values are always valid XML.
Is my JSON sent anywhere?
No. The conversion happens in your browser.