XML to JSON Converter
Convert XML to JSON instantly in your browser. Handles attributes, nested elements, and arrays. Also converts JSON back to XML. Free, client-side.
Frequently asked
questions
XML attributes are represented in the JSON output as keys prefixed with "@" (e.g., @id, @class). This is a common convention for XML-to-JSON conversion that preserves all XML metadata.
Namespace declarations (xmlns:*) are included as attributes in the JSON output. Namespace prefixes in element names are preserved as-is in the JSON keys.
CDATA sections (<!\[CDATA\[...\]\]>) are parsed and their text content is included in the JSON output as the text value of the element.