XML to JSON Converter
Represent XML elements, namespaces, attributes and ordered content as JSON.
Input
Result
How it works
The converter models elements with names and namespaces. Attribute lists and child arrays preserve order and distinguish text, comments and CDATA. DTDs are rejected before parsing.
Example
XML input: <root id="7"><item>Green</item></root>
The JSON tree contains a root element with an id attribute and one child element.