Skip to content
JSON & Data

XML to JSON Converter

Converts an XML document into an equivalent JSON structure. Useful when working with older APIs, RSS feeds, SOAP responses or configuration formats that predate JSON's dominance.

Free, no signupRuns entirely in your browser
Input
Result
{
  "user": {
    "name": "Alice",
    "age": 28,
    "role": "Admin"
  }
}
About

What the XML to JSON Converter does

The two formats do not map perfectly, and it helps to know where the friction is. XML distinguishes attributes from child elements and JSON has no equivalent concept, so attributes are typically folded in with a prefix. XML also has no arrays — repetition is implied by repeated tags — so a single repeated element can be ambiguous.

How it works

Using the XML to JSON Converter

  1. 1Paste your XML.
  2. 2The document is parsed into a node tree.
  3. 3Elements become object keys and text content becomes values.
  4. 4Attributes are folded into the object with a distinguishing prefix.
  5. 5Repeated sibling elements are collected into arrays.
Use cases

What people use it for

  • Modernising a legacy XML API response
  • Parsing an RSS or Atom feed into usable data
  • Converting an XML config into JSON for a new tool
  • Extracting data from a SOAP response
FAQ

Frequently asked questions

6 related

Related tools

All tools →