How to Use the XML to JSON Online
- 1Paste one XML document or a small fragment with a clear root. Keep the section containing the elements and attributes you want to inspect.
- 2Choose two or four spaces under Indentation Spacing. The option changes how the result displays the same parsed structure.
- 3Look for arrays where a tag repeats and for keys beginning with @_ where an element had attributes. Check the inferred type of values that resemble numbers or booleans.
- 4Copy the JSON and compare the field names and value types with the destination’s expectations before using it in a fixture or integration.
Input & Output Examples
Repeated item tags become an array under the feed object.
<feed><item>News</item><item>Events</item></feed>{
"feed": {
"item": [
"News",
"Events"
]
}
}The id attribute becomes an @_id property, and the active value is parsed as a boolean.
<product id="7"><name>Tea</name><active>true</active></product>{
"product": {
"name": "Tea",
"active": true,
"@_id": 7
}
}Practical Developer Workflows
- Inspect repeated feed items while prototyping the object shape a JavaScript consumer will need.
- Create a small JSON fixture from an XML response, then compare its attributes and field types against the contract.
- Trace which XML tag or attribute became a particular property before writing a schema or mapping rule.
Zero Server Uploads & Complete Privacy
Runs 100% in your browser; no data is uploaded to any server.
Let us know directly so our engineering team can fix it.