JSON to XML

How to use

Turns JSON into well-formed XML. Drop the JSON file, choose the indentation, and download the XML.

File ConvertersLocal only

Step 1 of 4: Upload

  1. 1
  2. 2
  3. 3
  4. 4

Step 1 of 4 · Upload

When to use this
  • Preparing a payload for a SOAP or XML-only API
  • Generating XML for a government or tax filing system from JSON data
  • Converting app data for a legacy system import
  • Producing XML test fixtures from JSON

Free and private. Everything runs on your own device, with no account and no uploads.

Plenty of systems still speak XML: SOAP services, government filing portals, payment gateways, older ERPs and configuration formats. This converter turns JSON into well-formed, indented XML: object keys become elements, arrays become repeated elements, and keys starting with "@" become attributes, so JSON that came from XML converts back to the original structure. Characters are escaped correctly and invalid element names are made safe rather than rejected.

Each item becomes a repeated element with the array's key as its name: {"tag": ["a", "b"]} gives <tag>a</tag><tag>b</tag>. A top-level array is wrapped as <root><item>…</item></root>.

Yes. Keys beginning with @ become attributes and "#text" becomes the element's text, the same convention XML to JSON uses.

Spaces and symbols are replaced with underscores, and names starting with a digit get a leading underscore, so the output is always well-formed.

As an empty element, such as <middleName/>.

How it works
  1. 1

    Add a JSON file

    Drop any JSON object or array.

  2. 2

    Set indentation

    Indented for reading, minified for transmission.

  3. 3

    Convert

    A single top-level key becomes the root element; otherwise everything is wrapped in <root>.

  4. 4

    Download the XML

    It starts with a standard UTF-8 XML declaration.

Pro tips
  • ·If the target system has a schema (XSD), check element names and order against it after converting
  • ·Wrap your data in a single top-level key to control the root element name
  • ·Use @ keys when the system expects attributes rather than child elements