๐Ÿ”€ XMLโ‡”JSON Converter

Couldn't convert this โ€” please check the input format.

Convert XML data into JSON, or JSON into XML. Useful for converting between data formats for API integration, or inspecting the contents of a legacy XML config file. Attributes are represented as "@attributeName" and text nodes as "#text".

How to use

  1. Choose the direction: "XML โ†’ JSON" or "JSON โ†’ XML".
  2. Paste the data you want to convert into the input box.
  3. The converted result appears automatically below. Use the "Copy" button to copy it.

FAQ

How are XML attributes represented?

Attributes appear as a key prefixed with "@" โ€” for example, the id in <person id="1"> becomes "@id": "1".

What happens with multiple child elements sharing the same tag name?

When a tag name appears more than once at the same level, it's collected into a JSON array.

Does this handle XML namespaces (xmlns)?

Basic XML structure is supported, but namespace handling is simplified. Complex namespaced documents may not convert exactly as expected.