How to convert XML to JSON
- Paste your XML, or open an .xml file.
- Choose whether to keep attributes and convert numbers.
- Copy the JSON or download it.
About this tool
Paste XML and get JSON. Attributes are kept as keys starting with @_, repeated elements become a list, and every value stays text by default, so an id like 007 is not turned into 7. If the XML is not well formed, you see the line and column of the first problem.
Common questions
Where do attributes go?
They become keys that start with @_, next to the element's children. Turn the option off to leave them out.
Can numbers and true or false be real JSON types?
Yes, tick the option. It is off by default because it can change values such as zip codes.
Are XML comments kept?
No. JSON has nowhere to put them, so they are dropped.
Is it free to use?
Yes. There's no sign-up, and you can use it as often as you like.
Is my text uploaded anywhere?
No. This tool runs inside your browser, so what you enter stays on your device.
Do I need to install anything?
No. It works in your browser on a computer or a phone.