JSON tools
XML to JSON Converter
Turn XML documents into clean, structured JSON that is easy to use in modern JavaScript and APIs.
How to use it
-
Paste your XML
Paste your XML or drop an .xml file into the editor.
-
Convert to JSON
Click Convert to parse the XML into clean, structured JSON.
-
Copy, download, or publish
Copy the JSON, download it, or publish it to a live HTTPS link.
Frequently asked questions
Is the XML to JSON converter free?
Yes, free, unlimited, and no sign-up required.
Is my XML sent to a server?
No. Parsing and conversion happen entirely in your browser, so your XML never leaves your device.
How are XML attributes and text handled?
Elements become JSON keys, nested elements become nested objects, and repeated elements become arrays. Attributes are preserved (commonly with an
@ prefix) and element text is captured so no information is lost.Why won’t my XML convert?
The converter needs well-formed XML. The usual culprits are an unclosed tag, more than one root element, or an unescaped
&, <, or > in text. The error message points you to the problem.Is there a size limit?
No fixed limit. Because it runs locally, the only ceiling is your device’s memory, and most documents convert instantly.
How do I host the JSON result?
Hit Publish to push the converted .json file to a live HTTPS URL, ideal for sharing an API sample or fixture, with no server setup.