← Tools

XML to JSON

Turn XML data into JSON for your code.

Private: your files never leave your device.

How it works

  1. Choose your files.
  2. Adjust the settings if you like.
  3. Download the result, or send it to another device with BroAllDone.

Frequently asked questions

How do I convert XML to JSON?

Paste your XML or open a file and tap Convert to JSON. Copy the result or download it as a .json file.

What happens to attributes?

They become keys that start with @, like "@id": 5. You can choose _ or $ instead. Text next to attributes or child elements goes in "#text".

What about repeated elements?

Elements that appear more than once become a JSON array. Turn on Always use arrays for elements if your code expects an array every time.

Are numbers converted?

Yes, if you like. 42 and 9.90 become JSON numbers written exactly as in the XML, and true and false become booleans. Values like 007 stay text, so nothing is lost.

Does it handle namespaces, CDATA and entities?

Yes. CDATA becomes plain text, entities like & and © are decoded, and namespace prefixes such as soap: can be kept or removed.

Is my XML uploaded?

No. Everything happens in your browser, so your data never leaves your device.

More free tools