JSON to XML
Convert a JSON document into XML.
Loading tool…
About the json to xml
Serialises JSON as indented XML. Keys prefixed with @_ are written as attributes, everything else becomes an element, and the result is formatted for reading rather than for the wire.
Frequently asked questions
Why is there no single root element?
XML needs exactly one root. If your JSON object has several top-level keys, each becomes a sibling element — wrap the object under one key first to get a valid standalone document.
How are arrays represented?
As repeated elements with the same name, which is the conventional XML idiom. There is no array wrapper element unless your JSON already has one.