How to use
- Paste the source, open a UTF-8 file or try the Sample.
- Choose the options and run the conversion or enable Auto run.
- Review the result, then copy a selection or download the complete text.
XML to JSON Converter
Paste a well-formed XML document. Compact mapping keeps the root name, groups attributes under @, uses #text for element text and collects repeated children in arrays. All text values remain strings.
Processing stays in your browser. DevToolsy does not receive the pasted data or selected file.
Input and processing
Choose Ordered content when text and elements are interleaved. It represents each element with name, attributes and an ordered children list; text children use a text property.
<team region="EU"><member>Ada</member><member>Lin</member></team>{
"team": {
"@": {
"region": "EU"
},
"member": [
"Ada",
"Lin"
]
}
}This example uses the default settings.
Result and limitations
XML declarations, comments, processing instructions and CDATA boundaries are not retained. DTD and external entities are rejected. XML text and arbitrary JSON do not have a universal lossless mapping.
Using the output
Review the result, then copy a selection or download the complete text.
UTF-8 input up to 1 MiB; output up to 8 MiB. Processing stops after 30 seconds.
Frequently asked questions
How are XML attributes and repeated children mapped?
Paste a well-formed XML document. Compact mapping keeps the root name, groups attributes under @, uses #text for element text and collects repeated children in arrays. All text values remain strings.
How do I preserve mixed text and elements?
Choose Ordered content when text and elements are interleaved. It represents each element with name, attributes and an ordered children list; text children use a text property.
What XML information is omitted?
XML declarations, comments, processing instructions and CDATA boundaries are not retained. DTD and external entities are rejected. XML text and arbitrary JSON do not have a universal lossless mapping.
Is the input uploaded?
Processing stays in your browser. DevToolsy does not receive the pasted data or selected file.
Can I keep the result?
Review the result, then copy a selection or download the complete text.