JSON to XML Converter

Convert a JSON object into indented, well-formed XML — for SOAP services, legacy integrations and config files that still speak XML.

Input · drop a file

Output

Conversion rules

  • An object with a single key becomes the root element; otherwise everything is wrapped in <root>.
  • Keys starting with @ become attributes; a #text key becomes the element’s text.
  • An array repeats the element once per item.
  • null becomes an empty element <key/>.
  • Characters not allowed in XML names (spaces, $) are replaced with _, and names cannot start with a digit.

Special characters in values (&, <, >, quotes) are escaped, so the output always parses.

Questions

Can I convert XML back to JSON?

Yes — press XML → JSON, or use the XML to JSON page.

Related tools