XML to JSON Converter
Convert XML to JSON, and JSON back to XML.
Questions
How is XML turned into JSON?
Each element becomes a key. Attributes become keys starting with @, and text next to child elements goes under #text. An element with only text becomes a plain string, and elements that repeat become an array. <book id="1"><title>A</title></book> becomes {"book": {"@id": "1", "title": "A"}}.
Why are numbers in quotes?
XML has no numbers or booleans: everything is text, so “007” stays “007”. Turn on “Numbers and true/false as values” to convert values that look like numbers or booleans.
What happens to JSON keys that aren’t valid XML names?
Element names can’t start with a digit or contain spaces, so those characters become underscores (“1 item” becomes _1_item). The result says how many names were changed.
Is it free? Do I need an account?
It is free to use and there is nothing to sign up for. There are no watermarks and no daily limits.
Missing something, or not working as it should? Tell us