Attributes and text
With the defaults, @id becomes an XML attribute and #text becomes text inside the element. Change the conventions to match your existing JSON format.
Map nested objects, arrays, attributes and text nodes between JSON and XML with configurable naming, formatting and validation.
Your converted output will appear here.
With the defaults, @id becomes an XML attribute and #text becomes text inside the element. Change the conventions to match your existing JSON format.
An array stored under a property repeats that property’s element name. A top-level array uses the configured fallback item name inside the root element.
Element and attribute names are validated rather than silently changed. Keys containing spaces or invalid starting characters must be renamed before conversion.
JSON distinguishes objects, arrays and primitives; XML uses elements, attributes and ordered text. There is no single lossless universal mapping, so choose conventions that the receiving system understands and validate the generated document against its schema when one exists.
Zero and false are preserved as text values. Null becomes an empty element. With self-closing output enabled it appears as <name/>.
Each array item becomes a repeated sibling element. For example, "tag":["a","b"] becomes two <tag> elements.
No. Mixed content, comments, CDATA boundaries, namespace declarations and the distinction between one element and an array can be represented differently after conversion. Review round trips carefully.
Existing namespace-qualified XML can be read in reverse mode, with qualified names retained. Forward conversion accepts colons in names but does not invent namespace declarations; include valid declaration attributes in the JSON when needed.