Skip to content
All tools›Converters›JSON to XML Converter

JSON to XML Converter

Convert a JSON file into XML. A default root element is created and JSON array entries become individual XML elements.

Loading tool...

JSON to XML conversion rules

JSON has no root element, no attributes and no element names for array items, so a few conventions are needed:

  • A root element (named root by default) wraps the whole document.
  • Each object property becomes a child element named after the property.
  • An array property becomes an element containing one <element> per entry.
  • Strings, numbers and booleans become text content. Reserved characters are escaped automatically.
  • null becomes an empty element.
  • With "Attributes from properties starting with @", "@id": 1 becomes id="1" and "#text" becomes text content.
---