JSON to XML Converter
runs in your browserno sign-upfree
Convert JSON data into clean, well-formed and indented XML online.
Converted to XML
About this tool
This converter turns JSON into well-formed, indented XML. Objects become elements, arrays become repeated elements, and keys starting with "@_" become attributes. Invalid characters in key names are fixed automatically so the XML is always valid.
How to use
- Paste your JSON into the JSON box.
- Set the root element name, indent and whether to add the <?xml ?> declaration.
- Copy the XML or download it as an .xml file.
FAQ
Which element is used as the root?
If your JSON has a single top-level key (like {"catalog": {...}}), that key becomes the root element. Otherwise everything is wrapped in the root element name you choose ("root" by default).
How are attributes and lists represented?
Keys that start with "@_" are XML attributes (for example "@_id": 7 becomes id="7"), "#text" holds the text of an element that also has attributes, and a JSON array becomes repeated elements with the same name. The same rules are used in both directions, so data converts back and forth cleanly.
Is my data uploaded?
No. The conversion runs in your browser, so your data never leaves your device.