JSON to XML
Paste your JSON data and convert to XML format.
About the JSON to XML converter
The TConverter JSON to XML converter takes JSON text and produces a well-formed, indented XML document. You paste your JSON, click Convert to XML, and the result appears right below the input, ready to copy or download as an .xml file. The tool is free, needs no sign-up, and works in any modern browser.
Although most new APIs speak JSON, XML is still widely used: older SOAP services, enterprise integrations, configuration formats, data feeds and import tools for many business applications expect XML input. Converting by hand is slow and easy to get wrong, especially with nested data. This tool is handy when you need to feed JSON data into such a system, prepare test payloads, or simply see how a JSON structure maps onto XML elements.
The output follows a few clear rules. The document starts with an XML declaration (version 1.0, UTF-8 encoding), and everything is wrapped in a root element named root. Each JSON property becomes an element with the same name, and nested objects become nested elements. When the top-level JSON is an array, each entry is placed in its own item element under the root, so a list of records turns into a sequence of item blocks. The XML is pretty-printed with two-space indentation, which makes it easy to read and review.
Conversion is done by the xml2js library running in your browser. Your data is not uploaded to a server, so you can convert internal or sensitive JSON without it leaving your device. If the input is not valid JSON, or a value cannot be represented in XML, the parser's error message is shown under the input instead of a partial result, so you know what to fix. Keep in mind that XML element names have stricter rules than JSON keys, so keys containing spaces or starting with a digit may need renaming before conversion.
Once the XML is generated you can copy it to the clipboard with one click, or download it as tconverter-output.xml. There is no fixed size limit for pasted data; very large inputs simply depend on the memory and speed of your own device.
Frequently asked questions
Is the JSON to XML converter free?
Yes. It is free to use and does not require an account.
Is my data sent to a server?
No. The conversion runs in your browser and your JSON is never uploaded.
What is the root element of the generated XML?
The output is always wrapped in a root element named root, preceded by an XML declaration with version 1.0 and UTF-8 encoding.
How are JSON arrays converted to XML?
If the top-level JSON is an array, each entry becomes an item element under root. Arrays inside objects are written as repeated elements with the property's name.
Why do I get an error for valid-looking JSON?
Either the JSON has a syntax problem, such as a trailing comma or single quotes, or a key cannot be used as an XML element name. The error message under the input explains the cause.