Loading...
Loading...
Convert XML documents into clean JSON for APIs, debugging, migration work, and data pipelines.
Elements
0
Attributes
0
Input Size
0 B
Output Size
0 B
Drop an XML file here
or paste XML directly in the input editor.
XML Input
JSON Output
This converter parses your XML document, preserves attributes, groups repeated elements into arrays, and writes readable JSON.
Input XML example:
<catalog version="1.0">
<book id="bk101">
<title>Clean APIs</title>
<author>Alice Johnson</author>
<price>29.99</price>
<available>true</available>
</book>
<book id="bk102">
<title>JSON Workflows</title>
<author>Bob Smith</author>
<price>34.5</price>
<available>false</available>
</book>
</catalog>Output JSON example:
{
"catalog": {
"@version": "1.0",
"book": [
{
"@id": "bk101",
"title": "Clean APIs",
"author": "Alice Johnson",
"price": 29.99,
"available": true
},
{
"@id": "bk102",
"title": "JSON Workflows",
"author": "Bob Smith",
"price": 34.5,
"available": false
}
]
}
}| Feature | Explanation |
|---|---|
| @attribute Keys | XML attributes become JSON keys prefixed with @. |
| #text Keys | Elements with attributes and text content store the text in #text. |
| Repeated Elements | Sibling XML elements with the same name become JSON arrays. |
| Beautified Output | Generated JSON is automatically formatted with two-space indentation. |
Yes. It is free to use and converts XML to JSON directly in your browser.
No. XML parsing and JSON generation happen client-side in your browser.
Attributes are prefixed with @, such as @id or @version.
Repeated sibling elements with the same tag name are converted into JSON arrays.