XML to JSON
Paste XML on the left to get formatted JSON on the right, instantly — no server, no upload.
Your files are processed locally in your browser. They are not uploaded to our servers.
How to use
- Paste your XML into the text box.
- The JSON output updates automatically as you type.
- Copy the result or download it as a .json file.
What is this tool?
XML to JSON uses your browser's built-in DOMParser to parse XML and recursively converts each element into a JSON object — attributes become keys prefixed with @, repeated sibling elements become arrays, and text content is preserved. No external library is used. Everything runs locally in your browser.
Common uses
- Converting an XML API response into JSON for testing
- Migrating configuration or data files from XML to JSON
- Inspecting the structure of an XML document more easily
- Preparing XML data for a JavaScript app that expects JSON
Related tools
FAQ
Is my XML uploaded anywhere?
No, everything is parsed and converted entirely in your browser using the native DOMParser API — nothing is sent to a server.
How are XML attributes represented in the JSON?
Each attribute becomes a key prefixed with @, for example an id="5" attribute becomes "@id": "5" in the output.
What happens with repeated child elements?
If an element has multiple children with the same tag name, they're combined into a JSON array in the order they appear.