Free · runs in your browser · no upload · no quota

JSON to XML Converter

Convert JSON into well-formed XML. Objects become elements, arrays become repeated elements, and keys that start with @ become attributes — the same convention the XML to JSON tool uses, so the two round-trip.

How to Convert JSON to XML

  1. Add your JSON
    Paste it into the left box or open a .json file.
  2. Name the elements
    Set the root element (root by default) and the element used for the items of a top-level array. Keys starting with @ become attributes.
  3. Copy or download the XML
    Copy the result, or click Download to save an .xml file.

Example

JSON
{
  "book": {
    "@id": "42",
    "title": "Dune",
    "tags": ["sf", "classic"]
  }
}
XML
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <book id="42">
    <title>Dune</title>
    <tags>sf</tags>
    <tags>classic</tags>
  </book>
</root>

Frequently Asked Questions

More browser tools

Working with files rather than text? Our file converters handle CSV to XML and 400+ other formats.