HomeDeveloper toolsXML to JSON Converter

XML to JSON Converter

Convert XML to an explicit JSON tree with attributes and ordered content.

Processing stays in your browser. Output uses name, attributes, and content arrays to preserve repeated elements and mixed text. It is a tree representation, not a universal XML-to-JSON convention.

How to use the xml to json converter

Convert XML to an explicit JSON tree with attributes and ordered content. Complete the xml document fields above, or upload a UTF-8 text file for the first field. Choose Run tool, review the output, then copy or download the result.

Example

The user element keeps its id attribute and the text before and after the b element.

Good to know

Output uses name, attributes, and content arrays to preserve repeated elements and mixed text. It is a tree representation, not a universal XML-to-JSON convention.