JSON to XML

Convert JSON values to XML with a configurable root element

Last updated: October 14, 2026

How to use

  • Paste or type your JSON in the input field
  • Customize the root element name (default: "root")
  • Choose indentation level (2 spaces, 4 spaces, or minified)
  • Nested objects and arrays are automatically handled
  • Click "Convert" to generate the XML
  • Use "Copy" to copy the result or "Download" to save as a file

Result actions

Copy or download the tool output, or share a link to JSON to XML.

Get new tools in your inbox

An occasional email when we ship new free tools. No spam, unsubscribe anytime.

Related tools

Convert JSON data to XML

Paste valid JSON, choose a root element name and indentation width, then select Convert. Objects become nested elements named after their property keys. Array entries become repeated item elements. Strings, numbers, and booleans become text; null values become empty elements. XML-sensitive text characters are escaped.

XML name and character requirements

The root and object property names must match this tool's supported element-name pattern: begin with an ASCII letter or underscore, then use letters, digits, underscores, periods, or hyphens. Property names that do not match are rejected. XML 1.0 control characters that cannot appear in text are also rejected.

Scope

The converter creates simple XML elements; it does not create attributes, namespaces, schemas, or a particular application's XML vocabulary. Validate the output against the receiving system's requirements. Conversion happens in your browser; the JSON is not sent to our servers.