Quick Tip: Paste any XML — attributes are mapped to @attr keys, text nodes to #text, and repeated tags become arrays automatically.
XML Input

Editor Empty

Paste JSON or drop a file to begin

JSON Result

XML to JSON Conversion: Modernise Your Data

Parse XML to JSON to work with legacy SOAP responses, RSS feeds, configuration files, and any XML-based API directly in modern JavaScript or Python applications.

  • Attribute Mapping: XML attributes become @attr keys.
  • Array Detection: Repeated sibling tags are automatically grouped into arrays.
  • Privacy-First: All conversion happens in your browser — nothing is uploaded.

Why Convert XML to JSON?

JSON is lighter, easier to parse, and natively supported by every modern web framework. Converting XML responses from SOAP services, RSS feeds, or configuration files into JSON lets you consume the data with standard JSON.parse() and modern tooling without heavyweight XML libraries.

XML to JSON Conversion Guide

Mapping Rules

  • Root element becomes a top-level JSON key.
  • Child elements become nested object keys.
  • Attributes are prefixed with @ (e.g., @id).
  • Text content with sibling elements uses a #text key.
  • Repeated tags are collapsed into a JSON array.

Quick Example

Input XML

<users>
  <user id="1">
    <name>Alice</name>
  </user>
  <user id="2">
    <name>Bob</name>
  </user>
</users>

Output JSON

{
  "users": {
    "user": [
      { "@id": "1", "name": "Alice" },
      { "@id": "2", "name": "Bob" }
    ]
  }
}

Common Use Cases

SOAP APIs

Parse legacy SOAP/WSDL responses into JSON to feed modern REST clients or front-end frameworks.

RSS / Atom Feeds

Convert syndication feeds into JSON arrays for easy rendering in news readers or aggregators.

Config Files

Transform Maven pom.xml, Android or Spring XML configs into JSON for quick inspection.


Frequently Asked Questions

Is my data safe with this JSON tool?

Yes. This tool uses 100% client-side processing. Your JSON data never leaves your browser and is never sent to our servers, ensuring maximum privacy and security.

How are XML attributes handled in the JSON output?

XML attributes are converted to keys prefixed with @ — for example, an id="1" attribute becomes "@id": "1" in the JSON object alongside the element's child keys.

When does the converter create JSON arrays?

Whenever two or more sibling elements share the same tag name, they are automatically grouped into a JSON array. A single element under a tag stays as a plain object.

Does this work with SOAP envelope XML?

Yes. The converter handles any well-formed XML, including SOAP envelopes. Simply paste the full XML response and the entire tree — including SOAP headers and body — will be represented as JSON.