Skip to the converter

HomeData & documents

XML to JSON converter

Turn XML into JSON.

Runs in your browserNo sign-upNo watermark

Your files never leave your device.

Quick answer

To convert XML to JSON, paste your XML or drop the file in. Tags become keys and attributes are kept with an @ prefix.

Drop a XML file here, or paste below

How to convert XML to JSON

  1. Paste your XML into the left box, or drop a file in. Try an example if you just want to see it work.
  2. The result appears on the right as you type.
  3. Press Download, or Copy to paste it somewhere else.

JSON is easier to work with in modern code than XML.

Common questions

What happens to attributes?

Attributes are kept as keys with an @ in front, such as "@id". The text of a tag with attributes goes in "#text".

What about repeated tags?

Tags that repeat become a JSON array.

Are numbers converted?

No. Values stay as text, so nothing like a zip code or an ID is damaged. Convert them in your own code if you need numbers.

Is my data uploaded anywhere?

No. The conversion happens inside your browser tab, so your data never leaves your device. We cannot see it or keep a copy.

What if my input has an error?

The page shows a message saying what is wrong, so you can fix it. Nothing is changed until the input is valid.