XML to JSON
Convert a bounded XML document into a documented JSON representation.
Make this result useful
Use it now, or keep a copy for later. We never save your tool input automatically.
How to use this tool
Paste XML with one root element and select Process data. Review the JSON structure before using it in an application.
Important to know
Convert a bounded XML document into a documented JSON representation.
DOCTYPE and entity declarations are rejected. Attributes appear under @attributes, element text under #text, and repeated sibling elements become arrays. Mixed-content order is not preserved.
Formula and methodology
The XML DOM is traversed from its root; child elements map to keys and repeated names map to arrays.
Frequently asked questions
Will XML convert back to the identical document?
No. XML and JSON model namespaces, attributes and mixed content differently.