Developer tool
JSON to XML converter
Turn JSON into XML for older APIs, config files and data imports. Need the other way? Use XML to JSON.
Advertisement
XML
Advertisement
How JSON becomes XML
- Each key becomes a tag:
{"name": "Asha"}→<name>Asha</name>. - An array repeats the tag:
{"tag": ["a", "b"]}→<tag>a</tag><tag>b</tag>. - Keys starting with
@become attributes, and#textbecomes the tag's text. This matches the output of our XML to JSON tool, so you can convert back and forth. - If the JSON has one top-level key, it becomes the root element. Otherwise everything goes inside
<root>, or the name you type. - Characters that aren't allowed in tag names (like spaces) become
_, and names that start with a number get a_in front.
Advertisement