Free Tool

Convert XML to JSON

Paste XML and get clean JSON. Attributes, nested elements, CDATA — all handled.

How attributes are represented in JSON

XML attributes become JSON keys prefixed with @. For example:

<plan currency="INR"><amount>1424</amount></plan>

becomes

{ "plan": { "@currency": "INR", "amount": "1424" } }

Repeated tags with the same name automatically become a JSON array. Mixed content (text alongside child elements) puts the text under a #text key.

Common uses

  • Migrating from legacy XML APIs to JSON-first REST APIs
  • Converting RSS feeds into structured data
  • Extracting data from SOAP responses
  • Reading sitemap XML programmatically (see also our Sitemap URL Extractor)