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.
<?xml version="1.0"?> <order id="1001"> <customer>Ada</customer> <item sku="A1">Notebook</item> <item sku="B2">Pen</item> <paid>true</paid> </order>
How to use it
- Paste your XML.
- Choose whether numbers and true/false become JSON values.
- 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".