JSON to XML Converter

Turn any JSON object or array into well-formed XML with full control over the root element name, child element tag, XML declaration, and indent size. Options to pivot tabular arrays into column-per-element layout and to auto-upgrade single-item arrays into proper element lists give you precise control over the output structure. Paste JSON directly, upload a file, or fetch a remote URL — conversion runs instantly in your browser without sending data to any server.

Input

JSON

Data Format

Element Names

Indent Size

3 rows, 4 columns
Output

XML

What is JSON to XML Converter?

SOAP web services, Android resource files, and a surprising number of enterprise data pipelines still require XML — but modern APIs deliver JSON. Rather than writing an XSLT stylesheet or hand-crafting XML wrappers, paste your JSON here and get a well-formed XML document in seconds. The converter maps each JSON key to an XML element name, handles nested objects as child elements, and turns arrays into repeated sibling nodes. Keys that would produce invalid XML element names are sanitised automatically. You can set a custom root element name, control how array items are tagged, and map specific JSON keys to XML attributes instead of child elements. Because the conversion runs client-side, internal API payloads, PII-containing records, and enterprise configuration files never leave your machine.

How to Use

  1. 1

    Paste Your JSON

    Type or paste your JSON object or array into the left editor, or drag-and-drop a .json file. The editor validates and highlights syntax errors before you convert.

  2. 2

    Configure XML Structure

    Set a custom root element name, choose indent size for pretty-printing, configure how arrays are tagged, and optionally map specific JSON keys to XML attributes instead of child elements.

  3. 3

    Generate the XML Document

    Click "Convert to XML". The tool traverses your JSON tree and builds a valid, well-formed XML document in real time, displayed with syntax highlighting in the output panel.

  4. 4

    Copy or Save the XML

    Copy the XML to your clipboard for immediate use in a SOAP client or XML editor, or download it as a .xml file for version control, pipeline integration, or schema validation.

Common Use Cases

SOAP API Integration

Enterprise SOAP web services require XML request bodies. Convert your JSON payload to XML to communicate with legacy SOAP endpoints without writing XML serialisation code manually.

RSS / Atom Feed Generation

Build RSS or Atom feed XML from a JSON array of articles or blog posts. Convert the structured JSON content into a feed-compliant XML document for syndication to readers and aggregators.

Android Resource Files

Android apps use XML for string resources and configuration. Convert JSON translation files or configuration objects into Android-compatible XML resource format for use in your res/ directory.

Data Migration to XML Systems

Migrate data from modern JSON APIs into legacy enterprise systems (SAP, Oracle, Salesforce) that accept XML imports by converting your JSON payload to well-formed XML before submission.

Conversion Examples

JSON Object → XML Document

Each JSON key becomes an XML element; nested objects become child elements.

Input JSON

{
  "person": {
    "name": "Alice",
    "age": 30,
    "email": "alice@example.com"
  }
}

Output CSV

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <person>
    <name>Alice</name>
    <age>30</age>
    <email>alice@example.com</email>
  </person>
</root>

JSON Array → Repeated XML Elements

Each array item becomes a sibling XML element under the parent key.

Input JSON

{
  "users": [
    {"id": 1, "name": "Alice"},
    {"id": 2, "name": "Bob"}
  ]
}

Output CSV

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <users>
    <id>1</id>
    <name>Alice</name>
  </users>
  <users>
    <id>2</id>
    <name>Bob</name>
  </users>
</root>

Frequently Asked Questions