Convert XML documents to JSON with auto-typed values and array detection
The xml to json converter works like this: it parses XML with the browser's DOM parser and emits JSON using predictable rules: repeated tags become arrays, text values auto-type to numbers/booleans, attributes keep under "@"-prefixed keys. Everything happens on your device - the input never leaves your tab unless the tool clearly states it performs a server-side lookup.
| Input | Result |
|---|---|
| <user id="7"><active>true</active></user> | {"user":{"@id":"7","active":true}} |
All parsing and transformation happens locally in this tab - your code and data are not sent anywhere.
It prevents collisions between attributes and child elements, and mirrors the convention used by mainstream XML-to-JSON libraries.
Text alongside child elements lands in a "#text" key so nothing is silently dropped.
A tag that repeats under the same parent becomes a JSON array; a tag appearing once stays a plain object - the predictable rule that keeps round-trips sensible.
Yes - text that parses as a number or boolean becomes a JSON number or boolean, so <count>42</count> turns into 42 rather than "42".
Zoven offers 200+ free browser tools. Browse by category - Calculators, Converters, Generators, Developer Tools and Media Tools - or read workflow guides on the Zoven blog.