Conversion Tools100% Client-Side

XML to JSON Converter

Paste an XML document to see its elements as a JSON object you can inspect or copy. Nested tags become nested properties, and repeated sibling elements can become an array. The converter also exposes attributes under keys that begin with @_ so they remain distinguishable from child elements. Use the result to read a feed, explore an integration payload, or build a fixture for code that consumes JSON.

Configuration Options
Input
95 chars•1 lines
Output

Reverse tool

JSON to XML

Convert JSON objects, arrays, and values into XML elements. Choose a root tag and indentation, then review the generated structure directly in your browser.

Open JSON to XML

How to Use the XML to JSON Online

  1. 1Paste one XML document or a small fragment with a clear root. Keep the section containing the elements and attributes you want to inspect.
  2. 2Choose two or four spaces under Indentation Spacing. The option changes how the result displays the same parsed structure.
  3. 3Look for arrays where a tag repeats and for keys beginning with @_ where an element had attributes. Check the inferred type of values that resemble numbers or booleans.
  4. 4Copy the JSON and compare the field names and value types with the destination’s expectations before using it in a fixture or integration.

Input & Output Examples

Repeated item tags become an array under the feed object.

Input Sample
<feed><item>News</item><item>Events</item></feed>
Expected Output
{
  "feed": {
    "item": [
      "News",
      "Events"
    ]
  }
}

The id attribute becomes an @_id property, and the active value is parsed as a boolean.

Input Sample
<product id="7"><name>Tea</name><active>true</active></product>
Expected Output
{
  "product": {
    "name": "Tea",
    "active": true,
    "@_id": 7
  }
}

Practical Developer Workflows

  • Inspect repeated feed items while prototyping the object shape a JavaScript consumer will need.
  • Create a small JSON fixture from an XML response, then compare its attributes and field types against the contract.
  • Trace which XML tag or attribute became a particular property before writing a schema or mapping rule.

Zero Server Uploads & Complete Privacy

Runs 100% in your browser; no data is uploaded to any server.

Notice a bug, calculation error, or outdated info?

Let us know directly so our engineering team can fix it.

Frequently Asked Questions

The parser prefixes attributes with @_ in the JSON output. An element that has both attributes and text can also use a #text property for that text. Check these names when passing the result into a schema that uses a different mapping.

Explore Other Tools

12 suggested tools

View all tools