Free tools, no sign-up — everything runs in your browser.
ToolHub 1000Free online tools

JSON to XML Guide: Objects, Arrays and Text

Learn how recursive conversion maps each JSON shape to an XML shape.

What is the JSON to XML Converter?

This tool walks a JSON value recursively and turns each object key into an element, each array item into a repeated element with the same name, and each primitive into element text. Text is escaped, so characters like less-than and ampersand do not break the XML. You choose the root element name. Attributes are not produced, because JSON has no direct attribute concept, and null values become empty elements.

How to use it

  1. Paste your JSON into the box.
  2. Set the root element name.
  3. Click Convert to XML and copy the result.

Worked example

For the sample with root data, the user object becomes a nested user element with name and age inside it, and the tags array becomes two separate tags elements, one per value.

Why do arrays become repeated elements?

Because XML has no array type of its own, so repeating an element is the natural way to represent a list.

Frequently asked questions

What happens to arrays?

Each array item becomes its own element using the array key as the element name, so order is preserved.

Are attributes created?

No. This converter produces elements and text only, because plain JSON has no attribute notation.

Try the JSON to XML Converter free · All guides