XML to JSON Converter
Convert XML format data to JSON format, preserving structure and attributes
Format JSON
Preserve XML Attributes
📄
XML Input
📋
JSON Output
⇄
Convert XML to JSON
Load Sample XML
Clear All
Copy JSON
Download JSON
📁
Click or drag XML file here to upload
Supports .xml and .txt file formats
Remove
XML Conversion Options
Auto-convert numeric types (Enabled)
Auto-convert booleans (Enabled)
Auto-handle duplicate elements as arrays (Enabled)
← Back to Tool List
Usage Tips
The tool automatically validates XML format and displays results in real-time
You can choose whether to preserve XML attributes, which will be displayed as @attributes field in JSON
Supports formatted JSON output for easy reading
Automatically handles duplicate elements and converts them to array format
Automatically tries to convert numbers, booleans, etc. to correct JSON data types
You can input XML content via text box or upload XML files directly
Click the swap button to fill JSON results back into the XML input box