JSON → XML
Turn a JSON document into well-formed, indented XML.
About this tool
Turn a JSON document into well-formed, indented XML — useful for feeding data into older systems, SOAP APIs, or any format that still expects XML instead of JSON.
How the structure maps over
Each object key becomes a child element with that name, and each array is represented by repeating that same element once per item rather than wrapping them in an artificial container — so ["a","b"] under a key called tags becomes two separate <tags> elements, not one <tags> holding a list.
Attributes and mixed content
Since plain JSON has no concept of an XML attribute, this tool uses a convention: any key starting with @ is written as an attribute instead of a child element, and a key named #text supplies text content alongside attributes or child elements on the same node. It's optional — you only need it if you're specifically targeting XML that uses attributes.
Frequently asked questions
Can I get attributes in the output XML?
Yes — prefix the key with "@" in your JSON, e.g. {"@id": "42"} becomes id="42" on that element.
Can I convert the XML back to JSON afterward?
Yes — XML → JSON uses the exact same @attribute and #text convention, so a round trip through both tools gets you back to equivalent JSON.