Updated
JSON XML converter explained
Represent XML as an ordered JSON tree with name, attributes and children fields. Text and nested elements share the children array, so mixed content and repeated element names keep their order. The reverse direction accepts that same tree shape.
A worked example
<p>A<b>B</b>C</p> becomes a p node whose children are the text A, a b node and the text C. An attribute stays separate from the element’s text.
Before you use the result
Not an arbitrary object-to-XML convention. Comments, processing instructions and the XML declaration are omitted; CDATA becomes ordinary text. XML 1.0 only, with no DTD or external entities. The reverse mode requires the exact tree structure shown by the forward mode.
Cite this page
ToolOctopus. “JSON XML converter.” Updated 2026-09-20. https://tooloctopus.com/json-xml-converter.
Add an access date if your instructions require one.
Citation formatting uses citeproc-js by Frank Bennett and Citation Style Language styles. Licence and source code.
