Converter
XML to JSON
Parse and convert XML to JSON locally, with nested data and validation.
Ready when you are
01
Add your contentPaste text or try a sample
02
Choose an actionClear options. Predictable results.
03
Take it with youCopy, download and carry on
Using this tool
Map XML elements, attributes and text nodes to JSON, optionally parsing numbers and booleans.
Actions: Convert
Example
Enable value parsing: count and active become a number and boolean, while the @_id attribute remains the string "07".
Example action and settings
Action: Convert Indent spaces: 2 Parse numbers and booleans: On
Input / action
<root id="07"><count>12</count><active>true</active></root>
Result / expected behavior
{
"root": {
"count": 12,
"active": true,
"@_id": "07"
}
}Available options: Indent spaces · Parse numbers and booleans
Scope and limitations
- DTDs and custom entities are rejected; attributes use @_ keys and mixed text uses #text.
- This object mapping does not guarantee preservation of mixed-content order or original XML formatting.
Common mistakes
- Numeric parsing can lose leading zeros in identifiers; turn it off when exact strings are needed.
Related tools
Privacy and browser support
Input is processed in this browser. Do not use real keys or active sensitive credentials as demonstration data. Device features require browser support and your permission.