Convert XML to JSON and back. Runs entirely in your browser — nothing you paste is sent anywhere.
6 answers to what people ask most about the XML ⇄ JSON.
Set Direction to XML to JSON and paste the XML. Elements become keys, and repeated elements with the same name become arrays.
With Keep attributes on, they appear in the JSON with an @ prefix, so id="1" becomes "@id": "1". Turn it off to drop attributes completely.
The XML is not well formed, for example a missing closing tag or an unescaped &. The error shows the line so you can fix it.
Yes. Paste the XML and you get the same data as JSON, which is easier to work with in JavaScript.
Yes, element text that looks like a number or boolean, such as 2026, is written as a JSON number rather than a string. Attribute values stay as strings.
Yes. It's free with no sign-up or limits, and it runs entirely in your browser, so your files are processed on your device and never uploaded. It works on phones and computers alike.
Something not working? Tell us and we'll fix it.
Report an issue