Convert between XML and JSON in either direction. Paste data or drag & drop a file.
XML → JSON Input:
JSON → XML Input:
Have questions? Check our FAQ page.
XML (eXtensible Markup Language) and JSON are both popular data interchange formats, but they serve different ecosystems. XML is prevalent in enterprise systems, SOAP APIs, configuration files (like Maven pom.xml or Android layouts), and document formats. JSON dominates modern REST APIs, NoSQL databases, and web applications.
Converting XML to JSON requires mapping XML's features (elements, attributes, text content, repeated elements) to JSON equivalents. This tool uses the following conventions: XML attributes become JSON keys prefixed with @, text content uses the #text key, and repeated child elements automatically become JSON arrays.