How to use XML to JSON

  1. Paste your XML in the input area.
  2. Click Convert to get formatted JSON.
  3. Copy or download the JSON output.

Example

Input

<root><name>DevToolsHub</name><active>true</active></root>

Output

{
  "name": "DevToolsHub",
  "active": "true"
}

Frequently asked questions

Why convert XML to JSON?
JSON is easier to work with in JavaScript and many APIs; converting XML to JSON simplifies parsing.
Are XML attributes included?
This converter is element-centric; attribute values are not mapped. Element text and child elements become JSON keys and values.