JSON to XML
Convert JSON data to XML structure
Convert
About this tool
Convert JSON data to XML structure
Ready to convert
Select a file and click Convert to get started
Map JSON objects and arrays into XML elements
JSON to XML reads one JSON file and creates an XML document. You can choose the root element name and the repeated item element used for a top-level array; nested object keys become element names.
Use conversion when an XML-shaped handoff is required
- •Wrap a JSON array in a named XML collection.
- •Create element-based XML for a system that does not accept JSON.
- •Inspect how nested JSON becomes a hierarchy of elements.
How to use this tool
- 1.Upload a UTF-8 JSON file up to 100 MB.
- 2.Enter valid root and item element names, or keep the defaults root and item.
- 3.Convert, parse the XML in the destination system, and compare arrays, nulls, booleans, numbers, and keys.
Element mapping rules
- A top-level object becomes children of the configured root; a top-level array uses the configured item element for each entry.
- Nested objects recurse into child elements, while nested arrays repeat their JSON property name.
- Configurable names must begin with a letter or underscore, use letters, digits, period, underscore, or hyphen, and cannot start with the reserved XML prefix.
Example: create an inventory document
For JSON [{"sku":"001","stock":4}] with rootTag inventory and itemTag product, the document contains <inventory><product><sku>001</sku><stock>4</stock></product></inventory>, with pretty-print whitespace added.
JSON and XML do not share one data model
- The converter creates elements only; it does not infer XML attributes or namespaces.
- Numbers, booleans, strings, and null become element text, so original JSON types are not encoded explicitly.
- JSON property names that are invalid XML names are normalized, which can make distinct keys collide.
Resolve conversion errors
- Invalid root or item name: use a letter or underscore first and avoid spaces or colons.
- Unexpected repeated tags: nested arrays repeat their property element name by design.
- Types changed after round-trip: XML text does not retain JSON primitive-type metadata.
Continue the workflow
Return to Data tools, or continue with a complementary tool:
Questions about this specific tool
Can I change the root element?
Yes. A valid rootTag value becomes the document root; an empty value uses root.
Where is itemTag used?
It names repeated elements for entries in a top-level JSON array. An empty value uses item.
Does it create XML attributes?
No. The current conversion model creates elements and text only.
Are JSON types preserved?
No. Primitive values become XML text, so a later reader needs its own rules to infer numbers, booleans, strings, or nulls.