XML to JSON Converter
Drop a file here or choose one
Supports files up to 20 MiB each.
Drop in a file, click convert, and you're done. Everything runs directly in your browser with no upload to wait for, and the result is ready to download right away.
Things to know
- Element attributes are stored as keys with an @_ prefix in front of the name.
- Repeated elements with the same name are grouped into an array. A single occurrence becomes a plain value, not an array.
- Malformed XML is not converted; you'll see a message instead.
How to use
Select an XML file
Choose an XML file up to 20 MiB.
Start converting
Once the file check is done, the JSON conversion starts.
Save the JSON
Download the finished JSON file.
Frequently asked questions
How are XML attributes stored?
Element attributes are stored with an @_ prefix in front of the name. For example, <item id="1"> becomes {"item":{"@_id":"1"}}, keeping attributes distinct from child elements.
What happens with repeated elements?
Elements that appear multiple times with the same name are grouped into an array. If an element appears only once, it's stored as a single value — account for both cases when using the output in code.
Are namespaces and CDATA supported?
Yes. Element names that include namespaces are used as keys unchanged, and text inside CDATA sections is stored as a plain string value.
Can I convert the resulting JSON back to XML?
No. Converting back to XML is not currently offered, so we recommend keeping your original XML file.
Is my data sent anywhere?
No. Your files never leave your device. Conversion runs inside your browser and nothing is uploaded.