How to use
- Open an XML file or paste it.
- Choose whether to include attributes, typed values and the indent.
- Download or copy the JSON.
Turn XML from APIs, RSS feeds or config files into JSON that's easier to work with.
🔒 Your files and data never go to a server — everything is processed on your device (in your browser).
Element names become keys, attributes become keys prefixed with @ (@id), and text next to attributes or children goes under #text. Two or more children with the same name become an array, and an element with only text becomes that text.
Paste an XML API response and you get JSON you can follow like response.body.items.item.
Use it for public APIs, product feeds, RSS and older configuration files that only come as XML and need to be handled by modern tools. Instead of long runs of tags you get keys and values, which makes the structure easy to scan.
It is also a good way to see what a response looks like before you write any code. You learn in advance how deep you have to go to reach the value you want.
If the document does not need attributes, turn the attribute option off and the result becomes much shorter. If important data sits in attributes such as id or type, keep it on.
With the number option on, 3 comes out as a number, but values like codes or reference numbers where a leading zero matters are safer left as text. Remember that an element appearing once becomes an object while one appearing several times becomes an array, and write the code that reads the result with that in mind.
XML has no “list” marker, so one element becomes an object and two or more become an array. Handle both in your code to be safe.
The name is kept as is (a:b) as the key.
If the format is wrong, CCO tells you roughly which line.
No. Everything is converted in your browser.
Comments are not content data and are not included in the result. Element text and attributes are what get converted.
Text that sits next to attributes or children is stored under the #text key. An element with only text simply becomes that text as its value.
As far as your device memory allows, files of tens of megabytes work. Because the file never leaves your device, there is no server size limit to fit under.