Converts JSON into XML (@_ keys become attributes).
JSON to XML converts a JSON document into formatted XML right in your browser. Keys prefixed with @_ are emitted as XML attributes, and the output is pretty-printed with two-space indentation. It is handy when you need to feed XML-based APIs, configuration files, or legacy systems from data you already have as JSON.
No. The conversion runs entirely in your browser using JavaScript, and nothing you paste is uploaded or stored on any server.
Prefix the JSON key with @_, for example {"item": {"@_id": "1"}} becomes <item id="1">. Keys without the prefix become regular XML elements.
The XML is pretty-printed with two-space indentation, and trailing whitespace at the end is trimmed.
The input is parsed with JSON.parse, so malformed JSON throws a parse error and no XML is produced. Fix the JSON syntax and try again.
No declaration is added automatically, and the JSON structure is converted as-is. If your JSON has multiple top-level keys, wrap them in a single object key first to get one root element.