All processing happens locally in your browser · No data uploaded
XML to JSON Converter
Parse any XML document and convert it to clean, readable JSON. Handles attributes, namespaces, CDATA sections, and mixed content correctly.
XML Input
DOMParser is not defined
JSON Output
JSON output will appear here...
XML to JSON Mapping
XML elements → JSON keys XML attributes → @attr keys Text content → #text Repeated elements → arrays
Examples
Simple XML
Result: {"person":{"name":"Alice","age":"28"}}
XML elements cleanly map to JSON keys.
Frequently Asked Questions
How are XML attributes handled?
XML attributes are mapped to JSON keys prefixed with @ by default (configurable). For example <tag id="1"> becomes {"@id":"1"}.