Format & Convert
XML ↔ JSON
Convert XML to JSON (attributes as @keys, repeated elements as arrays) and JSON back to XML.
Loading the XML ↔ JSON…
About the XML ↔ JSON
Convert XML documents such as SOAP responses, RSS feeds and config files to JSON, or generate XML from JSON. Attributes are written as "@name" keys, element text alongside attributes as "#text", and repeated elements as arrays, a widely used convention that round-trips cleanly.
How to use it
- Choose XML → JSON or JSON → XML.
- Paste your document.
- Copy or download the converted output.
Frequently asked questions
- How are XML attributes represented in JSON?
- As keys prefixed with @, for example <item sku="A"> becomes {"@sku": "A"}. Text in an element that also has attributes goes in "#text".
- What root element does JSON → XML use?
- A single top-level key becomes the root element. Anything else is wrapped in <root>.
- Is my data uploaded?
- No. Everything runs in your browser tab with JavaScript. Nothing you enter is uploaded, logged or stored, and the page works offline once loaded.