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

XML to JSON Converter

Convert XML — an RSS feed, a SOAP response, a sitemap, an export from an old system — into JSON. Attributes become @ keys, repeated elements become arrays, and the result reads back into XML with the JSON to XML tool.

How to Convert XML to JSON

  1. Add your XML
    Paste it into the left box or open an .xml file — RSS feeds, sitemaps and SOAP responses work too.
  2. Set the options
    Turn on Always use arrays if your code needs the same shape every time, and Detect numbers and booleans for typed values.
  3. Copy or download the JSON
    Copy the result, or click Download to save a .json file.

Example

XML
<library>
  <book id="42">
    <title>Dune</title>
  </book>
  <book id="7">
    <title>Solaris</title>
  </book>
</library>
JSON
{
  "library": {
    "book": [
      {"@id": "42", "title": "Dune"},
      {"@id": "7", "title": "Solaris"}
    ]
  }
}

Frequently Asked Questions

More browser tools

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