ByteKit
Home › Tools › XML to JSON Converter

XML to JSON Converter

Paste an XML document and get predictable, readable JSON. Tag names become object keys, repeated tags become arrays, and attributes are collected under @attributes. Everything runs in your browser — nothing is uploaded.

Output


[ AdSense — in-content 300×250 ]

Frequently asked questions

Is my XML uploaded to a server?

No. This converter runs 100% in your browser — nothing is uploaded, there is no server call, and your data never leaves your device.

How are attributes and repeated tags mapped?

Element attributes are collected under a "@attributes" key. Child elements that share the same tag name are grouped into an array, while a single child stays a plain value.

What happens to element text?

If an element contains only text, it becomes a plain string. When text is mixed with child elements, or the element also has attributes, the trimmed text is kept under a "#text" key. Invalid XML is reported as an error instead of partial output.