XML to JSON
Data & Converters
100% in-browser
Paste XML and get a JSON representation of its elements and attributes.
How to use the XML to JSON
- 1 Paste well-formed XML.
- 2 Elements become keys; attributes are prefixed with @.
- 3 Copy the JSON.
About the XML to JSON
Legacy APIs and feeds often return XML. This tool converts XML into a JSON structure so it is easier to work with in JavaScript and modern tools.
Parsing uses the browser’s native XML parser — nothing is uploaded.
Frequently asked questions
How are attributes represented?
Attributes appear as keys prefixed with @, and repeated elements become arrays.
Is invalid XML handled?
Malformed XML shows an error message.