XML to JSON
Convert XML documents to clean JSON objects instantly. Free online XML to JSON converter — handles attributes, nesting a
JSON will appear here...
How to Use XML to JSON
- Paste your XML: Paste any XML document into the input box, or load the sample with the Example button.
- Click Convert to JSON: Press the Convert to JSON button. Attributes get @ prefixes and repeated tags become arrays.
- Copy the JSON: Copy the formatted JSON output for use in your application.
About XML to JSON
XML to JSON Converter parses XML documents and produces clean, readable JSON objects.
- Attributes Support: XML attributes become JSON keys with an "@" prefix, like "@id".
- Array Detection: Repeated sibling tags are grouped into JSON arrays automatically.
- Mixed Content: Elements with both attributes and text keep their text under "#text".
Perfect for consuming RSS feeds, SOAP responses and legacy XML data in modern JavaScript applications.
Frequently Asked Questions
How are XML attributes converted?
Attributes become JSON keys prefixed with "@", like "@id" or "@type". Child text content is stored under "#text" when the element also has attributes.
How are repeated XML tags handled?
Repeated sibling tags are grouped into a JSON array automatically, preserving their order.
Is this tool free to use?
Yes — 100% free, no signup, and the conversion runs entirely in your browser for full privacy.