Konvertieren XML to JSON and back
Translate zwischen XML und JSON für interoperability mit Legacy APIs, preserving attributes, namespaces, und 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 JSON-XML-Konverter →
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 json-xml
Use the chain to convert JSON→XML with pretty-printing and proper declaration, for sending to XML-expecting APIs.
- 4 XML-Formatierer →
Formatieren or minify XML independently — useful when the XML is valid but hard to read, or needs compression for transport.
Häufige Fragen
- 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.
Workflows, die diese Aufgabe lösen
JSON in XML umwandeln
Ein JSON-Dokument in XML-Form übersetzen für Legacy-Integrationen, die nur XML akzeptieren. PIPELINE
JSON in formatiertes XML umwandeln
Ein JSON-Dokument in XML umwandeln und das Ergebnis pretty-printen für Lesbarkeit. PIPELINE
Plist zu JSON dann XML
Apple-Plist zu JSON dann zu generischem XML umwandeln. PIPELINE
Rohe XML-Dokument formatieren
Ein minifiziertes oder unformatiertes XML-Dokument pretty-printen für menschliche Review. PIPELINE
XML zu JSON dann CSV umwandeln
Ein XML-Dokument ueber JSON-Zwischenschritt in CSV abflachen fuer Tabellenkalkulations-Konsum. PIPELINE
XML zu JSON dann YAML
XML zu JSON dann zu YAML umwandeln fuer Konfigurationserstellung. PIPELINE
Verwandte Tools
JSON-XML-Konverter
Convert between JSON and XML formats online. Kostenlos, privat und 100% clientseitig. WERKZEUG
XML-Formatierer
Beautify or minify XML online with 2-space indentation. Kostenlos, privat und 100% clientseitig. WERKZEUG
JSON-Formatierer
Format, minify, or sort JSON online. Kostenlos, privat und 100% clientseitig. WERKZEUG