ToolBark
Converters

JSON to XML Converter

Turn any JSON object or array into clean, readable XML instantly

Conversion rules

  • JSON object keys become XML element tag names.
  • Arrays produce repeated child elements (plural key auto-singularised).
  • null values emit xsi:nil="true".
  • Invalid tag-name characters are replaced with underscores.
  • Strings, numbers, and booleans become text content inside their element.
About

Need to convert JSON to XML without installing anything? This free JSON to XML converter handles nested objects, arrays, nulls, and special characters automatically. Paste any valid JSON — objects, arrays, or primitives — choose your indentation style and root element name, then copy or download the well-formed XML output in seconds. No libraries, no sign-up, works entirely in your browser.

FAQ
How are JSON arrays converted to XML?+

Each array item becomes a repeated child element. The tool auto-singularises the parent key as the item tag name — for example, a key named "books" produces individual <book> elements. You can always rename the root wrapper to suit your schema.

What happens to null values?+

JSON null values are emitted as self-closing elements with an xsi:nil="true" attribute — the standard XML Schema convention for representing absent or null data in XML.

Are invalid XML tag names handled automatically?+

Yes. Any character that is not allowed in an XML element name (such as spaces, @, #, or starting digits) is replaced with an underscore, so the output is always well-formed regardless of your key names.

Can I convert a JSON array at the top level?+

Yes. When your input is a JSON array rather than an object, each element is wrapped in an <item> tag nested inside the root element you specify. You can change the root element name in the options bar before converting.

Related tools