Convertir XML to JSON and back
Translate entre XML y JSON para interoperability con heredado APIs, preserving attributes, namespaces, y mixed content.
- 1
XML and JSON have different models: XML has attributes, namespaces, and mixed content; JSON has only objects, arrays, and scalars. Conversion requires conventions for representing attributes (e.g. @attr) and text content (e.g. #text).
- 2 Conversor JSON ↔ XML →
Paste XML to get JSON, or JSON to get XML. The tool uses a consistent convention for attributes and text nodes, and handles namespaces by prefixing.
- 3
Use the chain to convert JSON→XML with pretty-printing and proper declaration, for sending to XML-expecting APIs.
- 4 Formateador XML →
Formatear or minify XML independently — useful when the XML is valid but hard to read, or needs compression for transport.
Preguntas frecuentes
- Why do attributes look different in the JSON?
- XML attributes have no direct JSON equivalent. Converters typically prefix them (e.g. @id for attribute id) or nest them under a special key. The convention varies by tool — check the output structure before consuming it.
- Can all XML be converted to JSON?
- Most XML can, but mixed content (text interspersed with child elements, like <p>Hello <b>world</b></p>) is awkward in JSON and requires array conventions. Namespaces and processing instructions may also be lost or represented differently.
Flujos que resuelven esta tarea
Convertir JSON a XML
Traducir un documento JSON a formato XML para integraciones heredadas que solo aceptan XML. CANALIZACIÓN
Convertir JSON a XML formateado
Transformar un documento JSON en XML y embellecer el resultado para legibilidad. CANALIZACIÓN
Plist a JSON a XML
Convertir Apple plist a JSON y luego a XML genérico. CANALIZACIÓN
Formatear documento XML sin procesar
Embellecer un documento XML minificado o sin formatear para revisión humana. CANALIZACIÓN
Convertir XML a JSON luego CSV
Aplanar un documento XML en CSV via un intermedio JSON para consumo en hoja de calculo. CANALIZACIÓN
XML a JSON a YAML
Convertir XML a JSON y luego a YAML para generacion de configuracion. CANALIZACIÓN
Herramientas relacionadas
Conversor JSON ↔ XML
Convert between JSON and XML formats online. Gratis, privado y 100% del lado del cliente. HERRAMIENTA
Formateador XML
Beautify or minify XML online with 2-space indentation. Gratis, privado y 100% del lado del cliente. HERRAMIENTA
Formateador JSON
Format, minify, or sort JSON online. Gratis, privado y 100% del lado del cliente. HERRAMIENTA