About this converter
XML attributes become JSON keys prefixed with @_. Repeated XML elements become JSON arrays. JSON values with that prefix are written back as XML attributes.
Convert XML to JSON or JSON back to XML entirely in your browser.
XML attributes become JSON keys prefixed with @_. Repeated XML elements become JSON arrays. JSON values with that prefix are written back as XML attributes.
Copy this HTML to cite this tool from your own site or article.
XML to JSON Converter converts XML documents to structured JSON objects and converts JSON objects back into valid XML markup.
XML Input: <user id="1"><name>Alice</name></user> JSON Output: {"user":{"@id":"1","name":"Alice"}}
Attributes are assigned a configurable key prefix (by default @) inside the parent JSON object.
Yes. Self-closing tags like <item /> convert cleanly to empty JSON properties or null values.