We use essential cookies to make this site work. Optional analytics cookies help us improve your experience. Privacy Policy
XML to JSON Converter
Convert any well-formed XML to clean JSON in your browser. Handles attributes, arrays, namespaces. Free and private. 100% free, private, and browser-based.
How to use
Paste XML — Drop any well-formed XML — SOAP, RSS, sitemap, config.
Choose Options — Keep XML attributes as @attributes; toggle pretty indent.
Copy JSON — Use the JSON in your app, API, or spreadsheet.
The XML to JSON Converter turns any well-formed XML document into a clean JSON tree using the browser's native DOMParser. Use it to migrate legacy XML APIs to modern JSON pipelines, convert RSS feeds for use in JavaScript, or reshape SOAP responses for use in Node.js.
Convention used
Each element becomes a JSON object keyed by its tag name.
Attributes are placed under "@attributes" (configurable).
Repeated child tags become arrays automatically.
Elements with both attributes and text use "#text" for the text content.
Common use cases
Convert RSS/Atom feeds for use in JavaScript apps.
Reshape SOAP responses for REST gateways.
Import OpenDocument or KML data into JSON databases.
Inspect sitemap.xml as a JSON tree.
Privacy
Parsing runs entirely in your browser. Confidential XML — SAML assertions, signed business documents, internal sitemaps — never leaves your device.
). Repeated sibling elements → array. Mixed content (text + inline tags) → array of strings and objects. The tool defaults to the most JavaScript-friendly variant and lets you switch via options." }} />
Common Trip-Ups
Repeated single elements — if XML has just one
keys, but the rest of the JSON ignores them. CDATA — preserved as plain string content; you lose the CDATA marker." }} />
When to Skip the Conversion
More Frequently Asked Questions
Does it handle XML namespaces?
Yes — preserved as
keys in the output.
What about mixed content?
Emitted as an array of text and element entries; check the docs in the SEO content above.
Is my XML uploaded?
No — parsing runs entirely in your browser.
Will it validate against a schema?
No — for XSD validation use a dedicated validator. This tool focuses on structural conversion.