Skip to content
snip tools

JSON to XML converter

Convert JSON to well-formed, indented XML. Runs entirely in your browser.

Runs 100% in your browser
 

How to convert JSON to XML

  1. Paste your JSON. Paste a JSON object or array into the input.
  2. Set the root element. Optionally rename the wrapping root element.
  3. Copy the XML. Copy or download the generated XML.

About JSON to XML

Plenty of enterprise systems, SOAP services and config formats still expect XML. This converter maps JSON to a clean element tree: keys become tags, arrays repeat their tag, and scalars become text. It's handy for feeding JSON data into XML-only pipelines or generating sample payloads. For tidying existing XML, use the XML formatter.

Frequently asked questions

How are JSON structures mapped to XML?
Each object key becomes an element. Arrays repeat the element for each item. Primitive values become the element's text content. You can set the root element name.
What about keys that aren't valid XML names?
Keys with characters that aren't valid in an XML tag name are sanitised (invalid characters replaced with underscores) so the output is well-formed.
Are special characters escaped?
Yes — < > & and quotes in text are escaped, so the XML is valid.
Is it private?
Yes — conversion runs in your browser; nothing is uploaded.