JSON to XML
Convert a JSON object to indented XML markup.
$json input
0 chars1 lines
$xml output[READY]
0 chars1 lines
Related Tools
FAQ
- What is the root element name?
- If your JSON is a single object, the root element is named <root>. Array items are wrapped in <item> elements by default.
- How are arrays converted?
- Arrays are expanded into repeated sibling elements sharing the parent key name. For example, {"color":["red","blue"]} becomes <color>red</color><color>blue</color>.
- Are all JSON types supported?
- Strings, numbers, booleans, null, nested objects, and arrays are all converted. Null values produce a self-closing tag (e.g. <field/>).
JSON to XML recursively converts a JSON object into XML markup. Object keys become element tags, arrays become repeated sibling elements, and primitive values become text content. Indentation is added for readability. The root element is named <root> unless the JSON has a single top-level key. Useful for generating XML from API responses or migrating JSON data to XML-based systems.