Developer

XML to JSON Converter

Convert XML markup into structured JSON and back to XML.

All tools

Input

Output

Converted output will appear here.

Frequently asked questions

How are XML attributes represented in JSON?
Most converters prefix attribute keys with @ or nest them under an "@attributes" object so they do not collide with child element names. The element text content typically lives under a key like "#text".
What happens when an XML element appears more than once?
Repeated child elements become a JSON array, while a single occurrence becomes a plain object. That ambiguity is why round-tripping XML through JSON can change the structure unless you know the schema.
Does the converter preserve XML namespaces?
Namespace prefixes are usually kept as part of the key name, like "ns:tag", but the xmlns declarations may be flattened or dropped. Round-tripping back to XML can lose the original namespace bindings.