Richscripts

XML to JSON converter

Paste XML and get readable JSON. Errors in the XML are reported with the reason.

Private: everything happens in your browser. Nothing you type or choose is uploaded.

How to use it

  1. Paste your XML.
  2. Choose whether numbers and true/false become JSON values.
  3. Copy the JSON.

Questions and answers

How are attributes shown?

As keys starting with @, for example "@id": "1001".

What happens to repeated elements?

Two or more elements with the same name become a JSON array.

What if an element has text and child elements?

The text is kept under the key "#text".

Data converters