πŸ”

JSON to XML Converter

Convert JSON objects and arrays into well-formed, indented XML. Customize the root element name and download the result.

Input JSON
XML Output

About JSON to XML Converter

This tool transforms a JSON object into well-formed XML. JSON keys become XML element names, string/number/boolean values become text content, arrays produce repeated elements, and nested objects become nested XML elements.

Conversion Rules

  • Objects β€” Each key becomes a child element.
  • Arrays β€” Each item becomes a repeated element with the array key as the tag name.
  • Strings / Numbers / Booleans β€” Become the text content of the element.
  • Null values β€” Produce an empty self-closing element.
  • Keys with spaces or special characters β€” Are sanitized to valid XML tag names.

FAQ

Yes β€” use the "Root element" field to specify any valid XML element name for the wrapping root tag. The default is "root".
Yes, the output starts with <?xml version="1.0" encoding="UTF-8"?> as is standard for XML documents.
XML tag names must start with a letter or underscore and can only contain letters, digits, hyphens, underscores, and periods. Invalid characters are replaced with underscores automatically.
No. All conversion happens entirely in your browser. Your data never leaves your device.