Free tool
Paste XML, get a structural JSON equivalent. Runs entirely in your browser on the built-in DOMParser; nothing is uploaded anywhere. Built by Imran Anwar, Principal Workday Integration Consultant, for quickly eyeballing Workday XML payloads (RaaS, EIB, SOAP responses) as JSON.
There is no universal XML→JSON standard — every converter picks its own convention. This one uses:
- Attributes become object keys prefixed with
@, e.g. <Book id="bk101"> → "@id": "bk101".
- A leaf element (no attributes, no child elements) becomes its trimmed text content directly as the value — a plain JSON string, not wrapped in an object.
<Genre>Computer</Genre> → "Genre": "Computer".
- An element with attributes and/or child elements becomes a JSON object. Any direct text it also contains is stored under a
#text key alongside the attributes/children.
- Repeated sibling elements (two or more children with the same tag name under one parent) become a JSON array. A single occurrence stays a plain value, not a one-item array — which means the JSON shape for that key can change from a plain value to an array if a second occurrence shows up elsewhere in the document. This is the standard trade-off of this convention; if you need a shape that never changes, always design your XML (or a post-processing step) to expect arrays.
- Mixed content (text interleaved with child elements) collapses all of an element's direct text node characters together into one
#text string — the exact interleaving position relative to the child elements isn't preserved.
- Comments, processing instructions, and the XML declaration are dropped; only elements, attributes, and text/CDATA content are converted.
One-way only. This tool converts XML → JSON; it does not convert back, since the array/single-value ambiguity above means the reverse mapping isn't reliably invertible without extra hints. For a browser-based XML transform in the other direction, see XSLT Transform.