Data converters
XML to JSON Converter
Paste XML — an RSS feed, SOAP response, sitemap or config file — and get predictable JSON. Attributes are prefixed with @, text nodes use #text, and repeated elements become arrays.
- Runs 100% in your browser
- No signup · No uploads
- Free, unlimited use
XML input
Examples: RSS feed · Config with attributes — ⌘/Ctrl + Enter converts · drop a file to load it · processed locally
JSON output
Output is read-only. Use Copy, Download or Share to move it out.
How to use the xml to json tool
-
Paste XML
Any well-formed XML works. The parser reports precise errors for mismatched tags instead of failing silently.
-
Know the conventions
Attributes become @name, text content becomes #text, and repeated child elements become arrays. These conventions keep round-tripping predictable.
-
Adjust and export
Change the attribute prefix, disable type casting, or ignore whitespace — then copy or download the JSON.
What makes this one different
- Predictable conventions: @attributes, #text, arrays for repeated elements
- Type casting for numbers and booleans, with a switch to keep everything as strings
- Clear error messages for malformed XML, including mismatched tags
- CDATA sections and namespaces handled without surprises
- Everything local — safe for SOAP payloads with customer data
Privacy by architecture: this page contains no analytics that receive your input, and the conversion code runs in your tab. You can disconnect from the network after loading and keep working.
XML to JSON — frequently asked questions
Why do attributes start with @?
XML allows an attribute and a child element with the same name, which JSON cannot express with one key. The @ prefix keeps attributes distinct from elements, so nothing is lost in the conversion.
How are repeated elements handled?
When the same tag appears more than once among siblings, the values become a JSON array. A single occurrence stays a scalar or object — which is why consumers should tolerate both, or why you should normalise in your code.
Does it support namespaces?
Yes. Namespaced elements keep their local names, and prefix collisions are preserved as written in the source. If you need full namespace fidelity, keep the original XML alongside the JSON.
Can it convert SOAP responses?
Yes — the envelope and body are converted like any other XML. For SOAP, keep casting enabled so numeric fields arrive as numbers rather than strings.
Related tools
Searching for “xml to json online”, “convert xml to json”, “rss to json”? You are in the right place — browse all 19 tools.