JSON to XML Converter
Convert JSON objects and arrays to well-formed XML — runs in your browser
Paste into the left panel, upload a file, or click Sample to try it out · use Swap to reverse the conversion
Need your JSON data as XML for a SOAP API, legacy system, or data pipeline? Paste it in and get well-formed, correctly indented XML back immediately. Nested objects become child elements, arrays become repeated elements, and all conversion happens inside your browser.
How to Convert JSON to XML
Paste JSON and download well-formed XML in seconds — no server, no signup.
Paste or upload your JSON
Enter a JSON object or array in the input panel, or upload a .json file. The converter validates the JSON before converting.
Automatic XML generation
JSON keys become XML element names, nested objects become child elements, and arrays become repeated sibling elements. Output is properly indented.
Copy or download
Copy the XML to clipboard or download as a .xml file ready for import into any system that consumes XML.
Features
Runs entirely in your browser — your data never leaves your device
Live conversion updates as you type — no submit button needed
Nested JSON objects become child XML elements automatically
JSON arrays become repeated sibling elements with the parent key as tag name
Object keys prefixed with @ are output as XML attributes
The #text key maps to the element text content
Correct XML declaration and indentation in output
Upload a .json file and download as .xml
Swap button converts XML back to JSON in the same tool
Free, no sign-up, no file size limits
Related Tools
Frequently Asked Questions
Does my JSON get uploaded to a server?
No. All conversion happens inside your browser. Your data never leaves your device.
How are JSON arrays converted to XML?
Array items are output as repeated sibling elements using the parent key as the tag name. Two items in a books array become two consecutive book elements inside the root element.
How do I output XML attributes instead of child elements?
Prefix the key with @ in your JSON object. A key named @id with value 123 outputs as id="123" on the XML element. The @ prefix is stripped in the output.
What happens to special characters like angle brackets and ampersands?
All values are XML-escaped automatically — less-than becomes <, greater-than becomes >, and ampersand becomes &. The output is always well-formed XML.
Can I convert XML back to JSON in the same tool?
Yes. Click the Swap button — the tool handles both JSON to XML and XML to JSON.
What is the root element tag name?
If your JSON is a single-key object, the root tag is that key name. If your JSON has multiple top-level keys or is an array, the root tag is called root.