How to Convert XML to JSON
Convert XML data to JSON format instantly. Handles attributes, namespaces, and nested elements. Free browser-based converter with formatting options.
Open XML Formatter →Step-by-Step Guide
Paste your XML
Copy your XML data — an API response, config file, SOAP payload, or RSS feed — and paste it into the input area. The tool accepts any well-formed XML document.
Choose conversion options
Select how to handle XML attributes (as properties, prefixed with @, or ignored), text content naming, and array detection. These options control how the XML structure maps to JSON.
Convert to JSON
Click convert to transform XML into clean, properly structured JSON. Nested elements become nested objects, repeated elements become arrays, and attributes are mapped according to your settings.
Copy or download
Copy the formatted JSON to your clipboard or download as a .json file. The output is valid JSON ready to use in your JavaScript, Python, or any application that consumes JSON data.
Try It Now — Free
No signup, no download. Runs entirely in your browser.
Open XML Formatter