XML to JSON

Convert XML to JSON, preserving attributes and namespaces.

XML Input
JSON Output
JSON output appears here

Related Tools

Frequently Asked Questions

How are XML attributes represented?

Each attribute becomes a key prefixed with @, e.g. becomes {"@id": "1"}, so attributes and child elements never collide by name.

What happens with repeated sibling tags?

They become a JSON array — two or more siblings under the same parent produce a "tool": [...] array instead of overwriting each other.

What about mixed text and child elements?

Direct text content alongside child elements is captured under a "#text" key so no data is silently dropped.

Is my data uploaded anywhere?

No — the conversion runs entirely in your browser via the native DOMParser.