Developer Tools

JSON to XML Converter

Convert JSON objects and arrays into well-formed XML with a customisable root element. Fast, private and free.

Tool

About the JSON to XML Converter

The JSON to XML Converter runs entirely in your browser — your data never leaves your machine. Paste, click and copy the result.

Some systems still speak XML — SOAP services, older SOAP/SOAP-style APIs, RSS, SVG and configuration files. This tool walks your JSON structure and emits matching XML: object keys become element names, arrays repeat an element, and primitive values become text content.

How to use this tool

  1. Paste a valid JSON object or array.
  2. Set a root element name (the wrapper around the whole document).
  3. Choose whether to include the <?xml version="1.0"?> declaration.
  4. Convert and copy the XML.

How the mapping works

JSONXML
{"a": 1}<root><a>1</a></root>
[1, 2]two repeated elements
nullan empty element

Developer tip

XML element names cannot contain spaces or start with a digit. The tool sanitises awkward keys automatically, but renaming them in the JSON first gives cleaner output.

Who is this tool for?

Developers integrating legacy SOAP services, building RSS or sitemap feeds, or moving data between JSON-first and XML-first systems.

Frequently asked questions

Each array item becomes a repeated child element, since XML has no native array type.
They become empty, self-closing elements so the key is preserved in the structure.
Yes. Set any valid XML name in the root field; the default is root.

Related tools

Guides for this tool