JSON to XML Converter

How it works
Indent
Valid JSON

Input JSON

No problems found. This is valid JSON.

About JSON to XML

Need to feed JSON data into a system that expects XML, such as a SOAP service or an older integration? Paste the JSON and get a well-formed XML document, indented and ready to use.

Each key becomes an element and each array item becomes a repeated element with the same name. Keys that are not valid XML names have their invalid characters replaced with underscores, and if the JSON does not have a single top-level key, everything is wrapped in a root element.

How to use it

  1. Paste your JSON into the Input panel.
  2. Check that the Output dropdown says Convert to XML.
  3. Choose an indent, or switch on Minify for compact XML.
  4. Copy the XML or Download it as an .xml file.

Frequently asked questions

How do I create XML attributes from JSON?

Prefix the key with @_, for example "@_id": "1". Use "#text" for an element’s text content next to attributes.

What happens to null values?

Nulls become empty elements, written as self-closing tags.

How are arrays converted?

An array under a key becomes several elements with that key’s name. A top-level array is wrapped in root and item elements.

Related tools