ClickZM

Guides ·

How to use JSON to XML

JSON to XML. Convert JSON objects to XML. Each array item becomes an element with the array's key as its name, e.g.

Open JSON to XML

The short answer

To convert JSON to XML, paste the JSON and choose a root element name. Objects become nested elements, arrays become repeated elements, keys starting with @ become attributes and #text becomes element text; invalid XML names are made safe.

It runs in your browser. What you enter is not uploaded.

How to use it

Type or paste your input into the JSON to XML.

Choose any options you need.

See the result update instantly.

Copy the result or download it.

Limits worth knowing

How are arrays converted? Each array item becomes an element with the array's key as its name, e.g. "tag": ["a","b"] becomes <tag>a</tag><tag>b</tag>.

How do I create XML attributes? Prefix the key with @: {"book": {"@id": "7"}} gives <book id="7"/>.

Sponsored

A recommended offer

Opens in a new tab. It is separate from the calculators.

Continue

Advertisement