XML TO JSON CONVERTER

Convert XML ↔ JSON bidirectionally. Attributes, arrays, and text nodes are handled automatically. Nothing is uploaded.

XML → JSON
Output will appear here

How to convert XML to JSON

  1. 1

    Paste your XML (or JSON) into the input panel.

  2. 2

    The tool defaults to XML → JSON mode; click the swap button to reverse the direction.

  3. 3

    Click Convert and see the result appear instantly.

  4. 4

    Copy the output or clear the panels to start over.

Questions

How are XML attributes mapped to JSON?
Attributes become keys prefixed with @, for example id="1" becomes "@id": "1". Text content of a mixed element goes into a "#text" key.
How are repeated XML child elements handled?
If an element appears more than once under the same parent it becomes a JSON array. A single occurrence stays a plain object or string.
Can I convert JSON back to XML?
Yes — click the swap button to switch to JSON → XML mode. Keys starting with @ become attributes, and arrays produce repeated sibling elements.
Is my data sent to a server?
No. All conversion happens locally in your browser using the built-in DOMParser and XMLSerializer APIs.