Convert XML data to JSON format instantly. Handles nested elements, attributes, and text content using the browser's built-in XML parser.
This tool uses the browser DOMParser to recursively convert XML tree structures into JSON objects. Elements become keys, nested elements become nested objects, repeated elements become arrays, attributes get an @ prefix.
Text-only elements become string values. Elements with children become nested objects. Same-name siblings are grouped into arrays. Attributes are prefixed with @ to distinguish from child elements.
Works with well-formed XML. Namespaces are preserved in element names. CDATA sections are treated as text content. Very large XML may cause browser performance issues.
More from TUDITOOLS