What is the XML to JSON Converter?
Working with XML in JavaScript is clumsy. Convert it to JSON: attributes are kept, and elements that repeat become arrays, so the result matches the data.
Features
Faithful conversion
Attributes and repeated elements handled.
Pretty output
Your choice of indent.
How to use the XML to JSON Converter
- 1
Paste your XML.
- 2
Pick the indent.
- 3
Copy the JSON.
Who it is for
Feeds
Use RSS or sitemap data in JavaScript.
Tips for better results
- Single elements become objects and repeated ones become arrays. Plan for both in your code.
Questions people ask
Is my XML uploaded?
No. Converted in your browser.
What is #text?
The text of an element that also has attributes or child elements.