JSON to XML Converter

Moving data between a modern API and a legacy system usually means translating JSON into XML — sitemaps, RSS feeds, SOAP endpoints and enterprise imports still speak XML. Our free JSON to XML Converter turns pasted JSON into clean, indented XML in one click: objects become nested elements, arrays become repeated <item> elements, and you choose the root element name. There is nothing to install and no signup; everything runs in your browser, so your data never leaves your device.

A built-in attribute convention makes the output genuinely useful: prefix any key with @ and it becomes an XML attribute instead of an element, which is exactly how feeds and config files usually look. Keys are sanitized into valid XML element names automatically, so messy key names never produce broken markup. And when the input is not valid JSON, you get the exact line and column of the problem instead of a cryptic failure.

Copy the result or download it as a ready .xml file. Developers, SEOs preparing sitemap XML, and anyone shuttling data between formats will save real time with it.

JSON to XML Converter

Convert JSON data into well-formed, indented XML with attribute support.

Attribute convention: prefix a key with @ (e.g. "@id": "42") to emit it as an XML attribute instead of an element. Arrays become repeated <item> elements; keys are cleaned into valid XML names.

How to use

  1. Paste your JSON into the text box.
  2. Set the Root element name (defaults to “root”).
  3. Prefix any key with @ to emit it as an XML attribute.
  4. Click Convert to XML.
  5. Click Copy XML to copy it, or Download .xml to save the file.
  6. Use Clear to reset and convert new data.

FAQs

How do I create XML attributes?

Prefix the key with an @ symbol. For example, {“book”: {“@id”: “1”, “title”: “Dune”}} produces <book id=”1″><title>Dune</title></book>. This convention is explained in the tool panel above the input.

What happens to arrays in my JSON?

Each array element becomes a repeated <item> element under the array’s key, which is the standard way to represent lists in XML. Nested arrays and objects are handled recursively.

My JSON has invalid keys with spaces or symbols — will it break?

No. Keys are sanitized into valid XML element names automatically: illegal characters become underscores and a leading digit gets an underscore prefix, so the output is always well-formed XML.