How to use the XML to JSON Converter
- Paste your XML into the left box, or open a file.
- Adjust the options if you need to.
- Copy the JSON or download it as a file.
What does this tool do?
The XML is parsed by your browser's built-in XML parser, which also validates that it's well-formed. Attributes are kept as @name keys, text alongside child elements as #text, and repeated child elements become arrays.
Why use it?
- Work with XML APIs and feeds in JavaScript.
- Inspect RSS, sitemaps and SVG metadata.
- Clear error messages for broken XML.
Example
<book id="1"><title>Dune</title></book> becomes {"book": {"@id": "1", "title": "Dune"}}
Privacy
Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us. There's no account to create and nothing to install.
Last reviewed by the M2Toolkit team.