⇄ JSON ↔ XML Converter
Convert JSON to XML with a configurable root element, or XML back to JSON using the browser's built-in DOMParser. Nothing leaves your browser.
Convention used: object keys starting with
@ become XML attributes on the
parent element; a key named #text becomes the element's text content; every other key
becomes a child element (an array value repeats that element once per item). Converting XML → JSON follows
the same convention in reverse — the JSON you get back is the root element's content, not wrapped
in the root tag name (that name is filled into "Root element name" instead), so round-tripping
XML → JSON → XML reproduces the original structure.