Tool Kumar tool
XML to JSON
Paste an XML document or open a local file to turn elements into JSON objects. Repeated sibling elements become arrays, which works well for data-focused XML.
How to use this tool
- Paste XML or open an .xml file.
- Choose XML → JSON when the detector identifies XML.
- Review the object and copy the formatted JSON.
Worked example
The JSON below is generated by importing the two repeated user elements.
Input · example.xml
<users><user><id>1</id><name>Ada</name></user><user><id>2</id><name>Lin</name></user></users>Output
{
"users": {
"user": [
{
"id": "1",
"name": "Ada"
},
{
"id": "2",
"name": "Lin"
}
]
}
}Options and edge cases
- Repeated child names become arrays.
- Attributes are kept with the importer’s attribute representation.
- The importer handles data XML. Mixed-content documents may need a domain-specific XML parser.
Private by default
Your document stays in this browser. Tool Kumar parses, converts and creates downloads on your device, with no account or upload step.
XML to JSON questions
- Do repeated XML elements become arrays?
- Yes. Repeated siblings are grouped into a JSON array.
- Are XML attributes preserved?
- Yes. Attributes are represented in the imported object so their values remain available.
- Can I open an XML file?
- Yes. Tool Kumar detects .xml files in the file picker and offers XML to JSON.