devkult_
tools24converters26
home/convert/json-to-xml

Convert JSON to XML

Some legacy APIs, SOAP services, and config formats still speak XML. This converter maps a JSON object to nested XML elements, wrapping the document in a root node and turning array items into repeated elements.

Example · JSONXML
JSON input
{
  "name": "Devkult",
  "stars": 1280,
  "tags": ["tools", "dev"],
  "open_source": true
}
XML output
<root>
  <name>Devkult</name>
  <stars>1280</stars>
  <tags>tools</tags>
  <tags>dev</tags>
  <open_source>true</open_source>
</root>

How to convert JSON to XML

  1. Paste your JSON object or array.
  2. Each key becomes an XML element; nested objects become nested elements.
  3. Arrays repeat the element, and special characters are XML-escaped.

Frequently asked questions

How are arrays represented in XML?

Each array entry is emitted as a repeated element with the same tag name, since XML has no native array type.

Are attributes generated?

No. Every value becomes a child element rather than an attribute, which keeps the mapping simple and predictable.

Related converters