XML to JSON
Convert XML to JSON format instantly. Paste your XML and get formatted JSON output.
Frequently Asked Questions
How does XML to JSON conversion work?
The converter parses XML elements into JSON objects, attributes become prefixed keys, and child elements become nested objects or arrays.
How are XML attributes handled?
XML attributes are converted to keys with an @ prefix by default (e.g., @id for attribute id), keeping them separate from child elements.
What about XML text content?
Text content within XML elements is stored under a special #text key in the resulting JSON object.
Does it handle CDATA sections?
Yes, CDATA sections are preserved and treated as text content within the element.