About JSON to XML
Need to feed JSON data into a system that expects XML, such as a SOAP service or an older integration? Paste the JSON and get a well-formed XML document, indented and ready to use.
Each key becomes an element and each array item becomes a repeated element with the same name. Keys that are not valid XML names have their invalid characters replaced with underscores, and if the JSON does not have a single top-level key, everything is wrapped in a root element.
How to use it
- Paste your JSON into the Input panel.
- Check that the Output dropdown says Convert to XML.
- Choose an indent, or switch on Minify for compact XML.
- Copy the XML or Download it as an .xml file.
Frequently asked questions
How do I create XML attributes from JSON?
Prefix the key with @_, for example "@_id": "1". Use "#text" for an element’s text content next to attributes.
What happens to null values?
Nulls become empty elements, written as self-closing tags.
How are arrays converted?
An array under a key becomes several elements with that key’s name. A top-level array is wrapped in root and item elements.