XML → JSON
Convert any XML document to JSON — SOAP responses, RSS/Atom feeds, SVG, config files, OpenXML. Attributes are prefixed, repeated elements become arrays, and scalars gain type inference. 100% client-side using the browser's native DOMParser.
// JSON will appear here…
XML to JSON Converter
Convert XML documents to JSON with configurable attribute prefix and text-node key. Powered by the browser's native DOMParser for correctness and speed. Perfect for SOAP responses, RSS feeds, OpenXML office docs, SVG data, and any legacy XML API you want to feed into modern JavaScript.
Conversion Rules
- Attributes become keys prefixed with
@(configurable) - Repeated child elements collapse to an array
- Mixed content gets a
#textkey (configurable) - Pure text elements with no attributes become bare values
- Type inference turns
"42"→42,"true"→true
FAQ
Does it validate XML schema?
No — only well-formedness. Use XSD/DTD tools for schema validation.
Is my XML sent anywhere?
No. The browser's DOMParser runs locally — safe for SOAP payloads with tokens.
Related
Convert the other way with JSON → XML, or read JSON vs XML.
Native DOMParser
Browser-grade XML parsing — the same one browsers use for XHTML.
Array collapsing
Repeated elements become arrays automatically.
Fully private
Nothing is uploaded — safe for SOAP responses with secrets.