π XML β JSON Converter
π XML Input
Waiting...
π JSON Output
Empty
Convert XML to JSON instantly with validation, formatting, error handling & stats. 100% free β works offline, no data sent to any server.
Paste or type your XML data in the left editor
Choose indent, attributes & trim options
Click XML β JSON button to convert instantly
Copy JSON or download as .json file
Converts in milliseconds
Validates XML syntax with errors
XMLβJSON and JSONβXML both
Formatted output with indent
Handles XML attributes with @
Shows nodes, depth, sizes
Download JSON as file
No data sent to server
Works on all devices
| XML Element | JSON Output | Example |
|---|---|---|
| <tag>value</tag> | {"tag": "value"} | Simple text |
| <tag attr="v"> | {"tag": {"@attr": "v"}} | Attribute |
| Nested elements | Nested objects | Parent β child |
| Multiple same tags | Array [] | Repeated β array |
| Attr + text | {"@attr":"v","#text":"t"} | Mixed content |
| <tag/> | {"tag": ""} | Empty/self-closing |
Format & beautify JSON
Encode/decode Base64
Minify CSS code
Test regular expressions
Encode/decode URLs
Format HTML code
Generate MD5/SHA hashes
Count words & characters