Data Conversion Tools Runs in your browser Free · no account

JSON to XML Converter

The JSON to XML converter writes a JSON structure as an indented XML document. Object keys become element names, arrays repeat their parent element, and any key that is not a valid XML name is sanitised so the output always parses.

Options
JSON 0 characters
XML to JSON
XML

Your result will appear here.

Not sure where to start? Use Load example.

Results update automatically and are calculated on your device. Nothing you type is sent to a server.

Runs in your browser. Processing happens entirely in your browser. Nothing you enter is sent to Delimiter.live.

How to use the JSON to XML Converter

  1. Paste valid JSON — an object or an array both work.
  2. Set the root element name, and the element name used for entries inside arrays.
  3. Copy or download the XML.

Example

Input
{"name":"Ada","tags":["a","b"]}
Output
<root>
  <name>Ada</name>
  <tags>
    <item>a</item>
    <item>b</item>
  </tags>
</root>

Common use cases

  • Feeding a legacy system that only accepts XML.
  • Producing XML fixtures from JSON test data.
  • Converting a configuration file between formats during a migration.

Limitations and things to watch for

  • JSON keys that are not valid XML names — those starting with a digit, or containing spaces or symbols — are sanitised, and the original key is preserved in a key attribute.
  • JSON null becomes an empty element. Booleans and numbers become their text representation, since XML has no native types.
  • Control characters that XML 1.0 forbids are removed from values.

Frequently asked questions

How are JSON arrays represented?
The array key becomes a container element and each entry becomes a child using the item element name you choose, so ["a","b"] under "tags" produces <tags><item>a</item><item>b</item></tags>.
What happens to keys that are not valid XML names?
They are sanitised into a valid name and the original key is kept as a key attribute, so no information is lost.
Is the output indented?
Yes, with two spaces per level, so the result is readable without running it through a formatter.

Share this tool