XML to JSON
Map XML elements, attributes and repeated children into explicit JSON locally.
How it works & useful details
JSON mapping
The root element becomes the single top-level JSON property. Attributes become keys prefixed with @; text becomes #text when an element also has attributes or children; sibling elements with the same name become arrays.
XML has no native JSON number or boolean types, so element text and attributes remain strings. DTD/entity declarations are rejected.
Private, bounded processing
This workspace parses text only in your browser. It never opens links, requests external entities, runs pasted configuration, or saves your document. Input is limited to 500,000 characters; conversion output is limited to 1,000,000 characters.
