What does the JSON to XML Converter do?
A JSON to XML converter maps each JSON key to an XML element and each array item to a repeated element under a root tag. Keys prefixed with @_ become attributes. The output is indented, escaped and ready for SOAP services, legacy APIs or XML configs.
How to use the JSON to XML Converter
- 1
Paste your json
Paste or type json into the input box, open a file from your device, or click Sample to load an example.
- 2
Adjust the options
Set root element to match what you need.
- 3
Copy or download the result
Review the xml on the right, then copy it to the clipboard or download it as a .xml file.
JSON to XML Converter example
{"store":{"name":"Imaginex","open":true,"products":[{"@_id":1,"title":"Mug","price":9.5},{"@_id":2,"title":"T-shirt","price":19}]}}<?xml version="1.0" encoding="UTF-8"?>
<root>
<store>
<name>Imaginex</name>
<open>true</open>
<products id="1">
<title>Mug</title>
<price>9.5</price>
</products>
<products id="2">
<title>T-shirt</title>
<price>19</price>
</products>
</store>
</root>When to use it
- •Sending data from a REST API to a SOAP or XML-only service
- •Generating XML config files from JSON settings
- •Migrating data between systems that speak different formats
Why use this json to xml converter
- 100% free, no signup or login
- Runs locally: your data never leaves the browser
- Instant results with clear error messages
- Works on desktop, tablet and mobile
- Copy to clipboard or download in one click
- No watermarks and no usage limits
Frequently asked questions
How are JSON arrays converted?+
Each array item becomes a repeated element with the array key as its name, which is the standard way XML represents lists. Top-level arrays use <item> elements.
Can I create XML attributes?+
Yes. Prefix a key with @_ (for example "@_id": 5) and it becomes an attribute id="5" on the parent element.
Is the JSON to XML Converter free?+
Yes. The JSON to XML Converter is 100% free with no signup, no login, no usage limits and no watermark. It works on desktop and mobile browsers.
Is my data uploaded when I use the JSON to XML Converter?+
No. The JSON to XML Converter runs entirely in your browser with JavaScript. Nothing you paste or upload is sent to our servers, logged or stored.
Last updated by the Imaginex AI team.