Skip to content

JSON to XML

Turn JSON into well-formed XML.

Options

Array entries have no key of their own, so they need one.

Private by design. This tool runs entirely in your browser. Your input is processed on your own device and is not uploaded by DO101.

About the JSON to XML

Converts a JSON document into XML with a root element you name, arrays expanded into repeated item elements, and every value properly escaped.

How to use it

  1. 1Paste your JSON.
  2. 2Name the root and array item elements.
  3. 3Copy the XML output.

What you get

  • Custom root and item element names
  • Correct escaping of &, < and >
  • Invalid element names sanitised automatically
  • Indented output
  • Runs in your browser

Frequently asked questions

Why do arrays need an item name?

JSON array entries have no key of their own, but every XML element needs a tag. The item name fills that gap.

What if my JSON keys are not valid XML names?

Keys starting with a digit or containing punctuation are sanitised, since XML element names cannot contain them.

People who use this tool usually reach for these next.