Converting W3C XML 1.0 documents into RFC 8259 JSON requires explicit rules for attributes, text nodes, and repeating elements. Powered by fast-xml-parser in your browser, this converter gives you direct control over every mapping decision.
By default, attribute names are preserved with an @_ prefix, text alongside attributes is stored under #text, and number parsing is disabled so leading zeros (such as postal code "042") or long IDs remain strings unless you enable numeric tag parsing (parseTagValue); attribute values always remain strings.
For example, given this XML:
<order id="042"><item>Pen</item><item>Notebook</item></order>
the default 2-space JSON output is:
{
"order": {
"@_id": "042",
"item": [
"Pen",
"Notebook"
]
}
}
If a repeating tag like item may appear only once in certain payloads, add item to the Force arrays (tag names) list (isArray) so downstream TypeScript/JavaScript code always receives a consistent JSON array.
