About XML to JSON
This tool converts XML into JSON using your browser's built-in XML parser. Element names become keys, attributes are stored under @attributes, text under #text, and repeated elements become arrays. It runs entirely in your browser.
How XML to JSON works
How to use it
- Paste your XML.
- Copy the formatted JSON.
How it works
The XML is parsed into a document tree and walked into a JSON object. Attributes are kept under an @attributes key and mixed text under #text, while elements that appear more than once become arrays so no data is lost.
Common uses
- Convert XML to JSON
- Parse an XML API response
- Turn config XML into JSON
- Inspect XML as JSON
- Migrate data formats
- Read RSS or SOAP data
- Convert nested XML
- Work with XML in JS
Frequently asked questions
How do I convert XML to JSON?
Paste XML and copy the JSON output.
How are attributes represented?
Under an @attributes key on the element.
How is repeated XML handled?
Repeated elements become a JSON array.
Is my XML uploaded?
No — it parses in your browser.
What if the XML is invalid?
You will see a parse error so you can fix it.
Where does text go?
Mixed text is stored under a #text key.
Is it free?
Yes — completely free with no sign-up.