Uni
Tools
Home
Tools
GitHub
Loading UniTools...
🔄
XML to JSON
Convert between XML and JSON formats with attribute support
Load Sample
XML
JSON
XML
Pretty Print
JSON
Convert XML to JSON
Clear
Tips
• XML attributes are converted to JSON with an
@
prefix (e.g., @id, @class)
• Text content is stored as
#text
when an element also has attributes or child elements
• Repeated XML elements with the same tag name are automatically converted to JSON arrays
• Use Pretty Print to format messy XML with proper indentation
• Toggle the direction to convert JSON back to XML format
• Load the sample to see how a complex XML document maps to JSON