About the XML to JSON converter
Turn an XML element tree into JSON with visible rules for attributes, text and repeated elements.
Conversion rules
- Attributes use keys prefixed with @.
- Element text uses #text when the element also has attributes.
- Repeated sibling elements with the same name become arrays.
- Elements without attributes or children become text values.
How to use it
- Paste a valid XML document.
- Select Convert.
- Review the generated keys and arrays before copying or downloading the JSON.
Mixed content
Elements that interleave text and child elements, such as text around a nested strong element, are rejected. This prevents a conversion that would silently lose the original text order.
Privacy
XML parsing and JSON generation run locally in your browser. The document is not uploaded.