XML to JSON

Convert XML into JSON in your browser — repeated elements become arrays, attributes are kept under @attributes — free, fast and private.

Paste XML and click Convert to JSON.

How to use XML to JSON

  1. Paste your XML into the box.
  2. Click Convert to JSON.
  3. Check the JSON output for the structure you need.
  4. Copy the JSON for your code or API.

Note: this tool runs in your browser. Nothing is uploaded.

Frequently Asked Questions

How are XML attributes converted?

Attributes are kept in an @attributes object on the element, so no data is lost in the conversion.

What happens to repeated elements?

Repeated sibling elements with the same tag become a JSON array.

What if my XML is invalid?

The tool shows a clear error message instead of crashing. Fix the XML and try again.

Is my XML uploaded anywhere?

No. The conversion runs entirely in your browser.