Conversor de XML a JSON
Convierte XML a JSON formateado con soporte para atributos, CDATA, elementos anidados y múltiples hijos. Gratis, privado e instantáneo.
How It Works
Paste XML
Copia y pega cualquier documento XML en el área de entrada. El ejemplo proporciona un caso realista con elementos anidados y CDATA.
Auto-Convert
The XML is parsed and converted to JSON instantly as you type. Attributes get an @ prefix and text nodes use #text.
Review JSON
The formatted JSON output is pretty-printed with 2-space indentation. Nested structures and arrays are clearly visible and easy to navigate.
Copy or Download
Copy the JSON to your clipboard with one click, or download it as a .json file for use in your projects.
About XML to JSON Converter
Convert XML documents to clean, structured JSON format instantly using browser-native DOMParser. This tool follows the standard xml2json convention — attributes are prefixed with @, text content is stored in #text when mixed with child elements, and multiple child elements with the same name are grouped into arrays. CDATA sections are treated as text content. The JSON output is pretty-printed with 2-space indentation for readability. All processing happens in your browser — no data is sent to any server.
Soporte de atributos
Los atributos XML se conservan con la convención estándar de prefijo @. Los múltiples atributos en un elemento se incluyen como claves separadas.@ prefix convention. Multiple attributes on one element are all included as separate keys.
Manejo de CDATA
Las secciones CDATA se tratan como contenido de texto y se incluyen en la salida. El texto sin procesar dentro de las secciones CDATA se conserva sin analizar.
Soporte de anidamiento y arrays
Los elementos profundamente anidados se convierten en objetos anidados. Los nombres de elementos repetidos en el mismo nivel se agrupan automáticamente en arrays.
100% privado
Toda la conversión ocurre en tu navegador usando DOMParser nativo. No se suben datos a ningún servidor. Funciona sin conexión después de cargar la página.