Mapping rules
- An element with only text becomes a string:
<id>42</id>→"id": "42". - Attributes become keys prefixed with
@; text next to attributes or child elements goes in#text. - Repeated sibling elements become an array. An element that appears once is not wrapped in an array, so check for both shapes in code - or use a format-specific converter such as UBL → JSON for a stable schema.
- Namespace prefixes are dropped by default (
cbc:ID→ID);xmlnsdeclarations are omitted.
Is my data uploaded?
No. Conversion runs in your browser, so nothing you add is sent to gratistools.be. See the privacy page for details.
Frequently asked questions
Is this tool free?
Yes. The core tool is free to use in your browser.