Data & spreadsheets
XML to JSON Converter
Conversion workspace
XML to JSON Converter
Converts XML elements and attributes into a JSON structure. Attributes are preserved as keys prefixed with @_.
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.