Data
XML JSON
Convert XML to JSON free. No signup. Files deleted after 1 hour.
Max 50MB5 conversions/hourView Basic and Pro plans →
About XML to JSON
XML to JSON uses fast-xml-parser. Attributes become keys that start with @, text next to attributes goes under #text, and elements that repeat become an array. Element text that looks like a number is turned into a number, so 007 comes back as 7, and the XML declaration shows up as a ?xml key.
Frequently asked questions
How are attributes represented?
As keys with @ in front of the name, so an id attribute becomes @id. Attribute values stay strings, while element text that looks like a number becomes a number.
What happens to repeated elements?
They become an array under the element name. An element that appears only once stays a single value, so the same tag can be an array in one file and a single value in another.