JSON to XML Converter
Convert JSON data into formatted XML. Configure root and array item element names. Free, private, no server uploads.
How It Works
Paste JSON
Paste valid JSON into the input area. The converter supports nested objects, arrays, strings, numbers, booleans, and null values.
Set Element Names
Customize the root element name and the element name used for array items. Defaults are "root" and "item" respectively.
Convert
Click Convert to generate XML. Objects become child elements, arrays produce repeated element names with your chosen item name.
Copy or Download
Copy the XML output to your clipboard or download it as a .xml file. All processing happens in your browser.
About JSON to XML Converter
Convert JSON data into well-formatted XML with full control over element naming. This converter parses your JSON and builds an XML document recursively: JSON objects become nested child elements, arrays generate repeated elements using your chosen item name, and primitive values (strings, numbers, booleans, null) are serialized as element text content. The output is indented with 2-space formatting for readability. All conversion happens entirely in your browser with no data sent to any server.
Custom Element Names
Set the root element name and array item element name to match your XML schema requirements. Defaults to "root" and "item".
Nested Structure Support
Handles deeply nested JSON objects, arrays of objects, mixed arrays, empty objects and arrays, plus all JSON primitive types.
Pretty-Printed Output
XML is formatted with 2-space indentation and proper line breaks. Element names are sanitized to be XML-compatible.
100% Private
All conversion happens client-side with vanilla JavaScript. No data uploaded to any server. Works offline after page load.