About JSON to XML
This converts JSON into indented XML — useful when a legacy system, enterprise integration, SOAP service, or configuration format expects XML but your data is in JSON. It maps the structure directly so you don't have to hand-write tags: paste JSON, get well-formed, readable XML back, ready to drop into the system that needs it.
How it works
The JSON is parsed, then walked recursively to build XML:
- Objects become nested elements — each key is a tag wrapping its value.
- Arrays become repeated elements: every item is emitted under the same tag name, which is how XML represents lists.
- If the JSON has a single top-level key, that key becomes the root element; otherwise the whole thing is wrapped in a
<root>element.
Text values are XML-escaped (&, <, >), the output is indented for readability, and it's prefixed with an <?xml version="1.0" encoding="UTF-8"?> declaration.
Assumptions and behaviour
- Keys become element names. A key that isn't a valid XML tag name (for example one starting with a digit or containing spaces) is replaced with a generic
<item>tag so the output stays well-formed. - Arrays repeat their parent tag rather than creating a wrapper list element.
- Everything maps to elements — the converter doesn't produce XML attributes; all data becomes nested tags and text.
- Special characters in text values are escaped so the XML is valid.
Limitations
- No attributes. JSON has no distinction between attributes and child elements, so everything becomes an element — you can't direct a field to become an XML attribute.
- Invalid tag names are renamed to
item. Keys with spaces, leading digits or symbols won't survive as-is, since XML element names are restricted. - JSON null/empty values produce empty elements rather than anything meaningful.
- It's a structural mapping, so it won't match a specific target schema (namespaces, required attributes, ordering) that a particular system expects — you may need to adjust the result.
Privacy
Conversion runs entirely in your browser. Your JSON and the resulting XML never leave your device.

