XML to JSON
Convert XML documents to JSON.
Loading tool…
Processing happens on your device using your browser's CPU/GPU. Results are kept only in this tab's memory and are wiped when you click “Clear” or close the page.
About XML to JSON
Paste an XML document and get equivalent JSON you can actually work with in JavaScript or Python. Element names become keys, attributes are prefixed with @, repeated tags become arrays, and mixed text is kept under #text. This is the quick way to inspect an SOAP reply, an RSS feed or a GST or bank XML file before you write parsing code. It converts locally in your browser.
How to use XML to JSON
- Paste your XML into the left pane or open an .xml file from your device.
- The JSON appears on the right as you type, using the browser's own XML parser.
- Check the attribute keys, which start with @, and any #text values for mixed content.
- Copy the JSON or download it as data.json.
What people use it for
- Reading a SOAP or legacy bank API response without writing a parser first
- Converting an RSS or sitemap feed into JSON for a small script
- Inspecting an XML export from Tally or a government portal before importing it
- Teaching or learning how XML structure maps onto JSON objects and arrays
Good to know
Attributes appear as @name keys and text content as #text when an element also has attributes or children. A tag repeated inside its parent becomes a JSON array automatically, so a single-item list may look like an object while a two-item list becomes an array. Invalid XML is reported with the parser's first error message rather than guessed at.