๐ง Utility Tools
XML to JSON Converter
Convert XML documents to clean JSON. Handles attributes, nested elements, and text content. Everything runs in your browser.
๐ฅ Used 6,318 times this month
XML Input
JSON Output
๐ก Ctrl+D to bookmark for next time
How it works
01
Paste XML
Copy XML from a file, API response, or config.
02
Set Options
Toggle attribute preservation and formatting.
03
Copy JSON
Clean JSON ready for JavaScript, Python, or any API.
Frequently asked questions
How are XML attributes handled?
By default, attributes are preserved as keys prefixed with @. For example <book id="1"> becomes {"book":{"@id":"1"}}. Turn off "Preserve attributes" to skip them.
What about repeated elements?
When multiple sibling elements share a name, they are converted to an array. Single occurrences stay as objects for cleaner output.
Does it validate XML?
Yes. Uses the browser's built-in DOMParser. Malformed XML produces a clear error message pointing to the problem.
Is my XML uploaded?
No. All parsing runs in your browser.
All tools are free, browser-based, and process files locally. Read our Privacy Policy | Visit our blog.