Convert XML to JSON Online Free
Overview
SOAP APIs, RSS feeds, and legacy data exports produce XML. Converting to JSON makes the data usable in modern JavaScript or Python applications. The converter handles XML attributes, namespaces, and CDATA sections, mapping them to predictable JSON fields.
How to Use This Tool
Paste your XML into the input panel and click Convert to JSON. The tool produces valid JSON with attributes mapped to @attr keys. Download the result or copy it directly into your application.
Ready to get started? It's free, no registration required, and your files never leave your device.
PDF Tool →Frequently Asked Questions
How are XML attributes handled in the JSON output?
XML attributes are mapped to keys prefixed with @ by default. For example, <user id='123'> becomes {"user": {"@id": "123"}}. This follows the BadgerFish convention used by most XML-to-JSON converters.
Can the tool handle XML namespaces?
Yes. Namespace prefixes are preserved in key names. A tag like soap:Body becomes a key of soap:Body in the JSON output.
What happens to XML comments during conversion?
XML comments are stripped during conversion. Only element content, attributes, and CDATA sections are preserved in the JSON output.