XML to JSON
Paste or upload XML, then convert it into clean, structured JSON — free, private, and processed entirely in your browser.
About XML to JSON
Working with an older API or a data feed that only provides XML is a pain when your code expects JSON. This tool converts XML directly into clean, structured JSON, mapping elements and attributes automatically.
Repeated elements become JSON arrays, and attributes are preserved alongside element content. Everything runs locally in your browser.
How to Convert XML to JSON
Step 1
Paste or upload your XML
Paste XML text, or upload an .xml file.
Step 2
Convert to JSON
Your XML is converted into clean, structured JSON.
Step 3
Copy your JSON
Copy the result, ready to use in your code.
Frequently Asked Questions
How are repeated XML elements handled?
Repeated sibling elements with the same tag name convert into a JSON array automatically.
What happens to XML attributes?
They're preserved and included alongside the element's content, not dropped.
Is this the reverse of your JSON to XML tool?
Yes — together they cover both directions.
Is my data uploaded anywhere?
No. Conversion happens entirely in your browser.
Can array entries have different shapes?
Yes — if some instances of a repeated element have attributes and others don't, array entries may be an object for one and a plain value for another. Check each entry's shape before assuming a key like @id exists on it.