Skip to content
BaroConvert

Data & spreadsheets

XML to JSON Converter

Converts XML elements and attributes into a JSON structure. Attributes are preserved as keys prefixed with @_.

Conversion workspace

XML to JSON Converter

Converts XML elements and attributes into a JSON structure. Attributes are preserved as keys prefixed with @_.

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.
Checking browser support
Verifying file selection and download support before starting.
Output settings

This tool converts right away with sensible defaults — no extra settings.

How to use

  1. Select an XML file

    Choose an XML file up to 20 MiB.

  2. Start converting

    Once the file check is done, the JSON conversion starts.

  3. 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.