JSON to XML Converter

Convert JSON data into XML instantly in your browser. Free online JSON to XML converter with root-element control — no uploads.

Optional. Defaults to "root".

Loading calculator…

Results

XML output

What is this calculator for?

Transform JSON objects and arrays into nested XML with configurable root naming.

How to Use This Calculator

Enter the values below, then press Calculate (or press Enter). The calculator updates your results instantly. Try different values to see how your inputs change the outcome.

  1. JSON to convert — enter a value. A typical JSON to convert would be {"note":{"to":"User","body":"Hello"}}.
  2. Root element name — enter a text value. A typical Root element name would be root.
  3. Review your results — the key output is highlighted, with supporting figures below.

What You'll Need

JSON to convert
a value · required
Root element name
a text value · optional

About This Calculator

This converter maps JSON to XML: objects become nested elements, arrays repeat the element for each item, and primitive values are escaped as text content.

Object keys that aren’t valid XML tag names (or empty keys for array items) default to item so output stays well-formed. Provide a root name or let it default to root.

Conversion runs entirely in your browser.

Worked Examples

Example

<note> <to>User</to> <body>Hello</body> </note>

Frequently Asked Questions

How are JSON arrays converted?
Each array element becomes a repeated tag (e.g. <item>…</item> per element), matching how XML represents lists of records.
Are attribute-based XML exports supported?
This produces element-based XML only. For attribute-based output you would need a mapping layer — most modern integrations accept either form.