Developer Tools

XML to JSON Converter

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

Share:
13 lines • 222 chars

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

Quick examples

Usage notes

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

How to Use This Tool

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

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.