JSON to XML Converter
Runs in your browser — your files are never uploaded.
Convert a JSON document into well-formed XML, ready for a system that still speaks it — SOAP endpoints, RSS pipelines, Android layouts, enterprise imports. Arrays repeat their parent tag rather than nesting a wrapper, values are XML-escaped, and keys that are not legal XML names are sanitised instead of producing a document that no parser will accept. Everything runs in your browser.
How to convert JSON to XML
- 1
Drop your .json file onto the box, or click to choose one.
- 2
Optionally set the root element name — the default is <root>.
- 3
Click “Download” to save your .xml file.
Share
Embed this tool on your site
Paste this where you want the tool to appear. It runs entirely in your visitor's browser — no uploads, no account, no tracking.
Please keep the attribution line — it's what keeps these tools free.
Need a different size, a dark theme, or a different tool? Build an embed lets you preview it first.
Frequently asked questions
What happens to a top-level array?+
XML permits exactly one root element, so a top-level array is wrapped and each entry becomes an <item>. If your JSON is a single-key object, that key is used as the root instead — which is what makes a round trip through our XML to JSON converter come back to the document you started with.
Can I produce attributes rather than child elements?+
Yes. A key beginning with @ becomes an attribute, and a "#text" key becomes the element’s text content. That is the same convention our XML to JSON converter emits, so the two tools compose.
What if a JSON key is not a valid XML element name?+
It is sanitised. XML names cannot start with a digit or contain spaces, so a key like "2 items" would otherwise produce a document that fails to parse. Sanitising is the only option that yields usable output.
Is the output indented?+
Yes — two spaces per level, with empty values written as self-closing tags. It is meant to be read and diffed, not just piped somewhere.
Are special characters escaped?+
Yes. Ampersands, angle brackets and quotes are escaped in both element text and attribute values, so content containing markup or HTML entities cannot break the document.