XML to JSON Converter
Convert XML to JSON online free. Handles attributes (@attr), repeated elements as arrays, CDATA and RSS feeds. Runs in your browser — no upload.
🔒 Private: runs in your browser, no upload
How to convert XML to JSON
- Paste XML in the left box or upload an .xml file.
- JSON appears instantly; attributes are prefixed with @ and repeated tags become arrays.
- Copy the JSON or download converted.json.
Frequently asked questions
How are XML attributes converted?
Attributes become keys prefixed with @, e.g. <book id="1"> becomes {"@id": "1"}. Text inside an element that also has attributes or children is stored as #text.
What happens with repeated elements?
Sibling elements with the same name are grouped into a JSON array.
Is my XML uploaded?
No. The XML is parsed by your browser's built-in DOMParser; nothing leaves your device.
Why do I get a parser error?
XML must be well-formed: every tag closed, one root element, attribute values in quotes and special characters like & escaped as &.