JSON to XML Converter

Convert JSON to well-formed XML with a custom root element, arrays as repeated elements and attribute support.

Converter

Was this tool useful?

About this tool

About JSON to XML Converter

Turn JSON data into XML for older systems, feeds and SOAP-style APIs.

How it works

Objects become elements, arrays repeat the element name, keys starting with @ become attributes and #text becomes text content.

Example

{"book":{"@id":"1","title":"PHP"}} → <book id="1"><title>PHP</title></book>

How to use this tool

  1. Paste JSON.
  2. Set the root element name and indentation.
  3. Copy or download the XML.

Frequently asked questions

Is my code uploaded?

No. Everything runs in your browser, so your code and data stay on your device.

What happens to invalid XML names?

Characters not allowed in XML tag names are replaced with underscores.

Does the JSON to XML Converter send my data to a server?

No. The JSON to XML Converter runs entirely in your browser using JavaScript, so tokens, code and data you paste stay on your device. You can even use it offline once the page has loaded.