Developer Tools

XML to JSON Converter

Convert XML documents to JSON format. Handles attributes, nested elements, and arrays automatically.

Free · Runs in your browser · No signup · Files stay on your device

Share:
13 lines • 222 chars

Paste XML, inspect the converted JSON, and copy the output without leaving fullscreen mode.

Quick examples

How to use

How to use XML to JSON Converter

  1. 1Paste XML data.
  2. 2JSON output appears instantly.
  3. 3Copy the JSON result.

Tips

Quick tips

  • XML attributes become @attribute keys in JSON.
  • Repeated sibling elements become JSON arrays.
  • Text-only elements become simple string values.

FAQ

Frequently asked questions

How are XML attributes converted?

Attributes become keys prefixed with @ (e.g., @id).

How are repeated elements handled?

Multiple sibling elements with the same name become a JSON array.

Related

Related tools and guides