iLoveMyFile

XML to JSON

Convert XML to JSON. Attributes, repeated tags and text are mapped in a clear, predictable way.

XML

Paste XML above, or upload an .xml file.

How to use XML to JSON

  1. Paste your XML or upload a file.
  2. Click Convert to JSON.
  3. Copy the JSON or download it.

Frequently asked questions

How are attributes converted?

An attribute becomes a key that starts with "@", for example id="7" becomes "@id": "7". Text that sits next to attributes or child tags is stored under "#text".

What happens to repeated tags?

Tags with the same name inside one parent become a JSON array, in their original order.

Are numbers converted to JSON numbers?

No. Every value is kept as text exactly as written, so codes with leading zeros and long IDs are never altered.

Is my text uploaded to a server?

No. This tool runs entirely in your browser, so what you paste never leaves your device.