Convert XML to JSON
To convert XML to JSON, add the .xml file, choose whether numbers and true or false should become JSON types, and click XML to JSON. Attributes become @ keys, repeated elements become arrays and text becomes values, in indented JSON. It runs in your browser, so the file is not uploaded.
Attributes become @keys and repeated elements become arrays
Choose Files
or drop documents directly into this area
Quick facts
- Formats
- XML or Text (TXT) → JSON; several results come as one ZIP
- Where it runs
- In your browser, on your own device. Files are not uploaded.
- Size limit
- 600 MB per run on a computer, 200 MB on a phone or tablet
- Files per run
- Up to 50
- Last updated
How to use XML to JSON
Choose one or more XML files.
Turn on Convert numbers and true/false to JSON types if you want typed values.
Click XML to JSON.
Download the .json file.
Features & Privacy
Fast & High Quality
Private: Files Never Leave Your Device
Batch Processing
Frequently Asked Questions
Each attribute becomes a key that starts with @, for example @id. When an element has attributes or children as well as text, the text is stored under #text.
Sibling elements with the same name become a JSON array. A single child stays a plain value or object, so check for both cases if your data varies.
With Convert numbers and true/false to JSON types on, values such as 42 or true become JSON numbers and booleans. When it is off, every value stays a string.
Comments, processing instructions and the exact order of differently named sibling elements are not kept. CDATA sections are kept as normal text.
You get an error message, with the line and column of the problem when your browser provides them, so you can fix the XML and try again.
No. The conversion runs in your browser on your own device, so the file never leaves it. Files up to about 600 MB work on a computer and 200 MB on a phone.
Related Tools
Continue your workflow with these related tools: