JSON to XML
Turn a JSON document into well-formed XML. Object keys become tags, arrays repeat their element, and every text value is escaped for you.
How to use the JSON to XML Converter
Paste your JSON into the input box — the default sample is {"a":1,"b":["x","y"]}.
Set the root element name (default root) and tick Pretty print if you want indented output.
Click Convert, then Copy XML or Download .xml to use the result.
Frequently asked questions
How are JSON arrays handled?
Every item in an array becomes a repeated copy of the element name, so the array ["x","y"] stored under the key b produces <b>x</b><b>y</b> as sibling elements.
How are special characters handled?
Text values are escaped so that &, <, >, " and ' become entity references such as & and <, keeping the generated XML well-formed.
Can I change the root tag?
Yes. Type any valid XML element name into the root field; characters that are not allowed in an XML name are replaced with underscores automatically.