Best JSON to XML Converter Online

Free Well-formed XML · Syntax highlighted · Handles all types
Root
Array item
Indent
Error
JSON
XML
// XML output

More Developer Tools

JSON Formatter
Format, validate & minify
XML Formatter
Format & validate
XML→JSON
To JSON
JSON→YAML
To YAML config
JSON→CSV
Array to CSV
JSON→TOML
To TOML config
HTML Formatter
Format & beautify
Regex
Live test regex

Why This Is the Best JSON to XML Converter

Instant Conversion

Convert JSON to well-formed XML in real-time as you type. Supports all JSON types including nested objects, arrays, strings, numbers, booleans and null.

Custom Root & Item Tags

Configure the root element name and the tag used for array items. This lets you produce XML that matches your target schema or existing API contract.

Syntax Highlighting

XML output is color-coded by tag name, attribute, and text content for easy readability and debugging.

Download XML

Export the result as a .xml file for direct use in APIs, data pipelines, XSLT transforms, or any system that consumes XML data.

Frequently Asked Questions

How does JSON to XML conversion work?

Each JSON key becomes an XML element tag. Objects are converted to nested elements, arrays produce repeated elements (using the configured item tag name), and primitive values become text content inside their tag.

What happens to JSON arrays?

JSON arrays are converted to repeated XML child elements. You can customise the element name used for array items using the "Array item" option in the toolbar (default: <item>).

Are special characters escaped correctly?

Yes. All text content and attribute values are XML-escaped: & → &amp;, < → &lt;, > → &gt;, " → &quot;. The output is always well-formed XML.

Can I use this for SOAP or REST APIs that require XML?

Yes. The output is standard well-formed XML with an XML declaration. It can be used as a request or response body for SOAP services, XML-based REST APIs, or any system that consumes XML data.

In-depth guide
Data Format Conversion Guide
CSV, XML, JSON, HTML & Markdown
Read the guide