JSON to XML Converter

Convert JSON data to XML format — paste JSON and get clean XML output with customizable options

  1. Home
  2. /
  3. JSON to XML Converter

Options

XML Output

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <person>
    <name>John Doe</name>
    <age>30</age>
  </person>
</root>

JSON Size

0 B

XML Size

0 B

Depth

0

Ratio

-

What Is JSON to XML Conversion?

Converting JSON to XML is useful when working with legacy systems, SOAP APIs, or configuration files that require XML format. JSON is great for modern web applications, but many enterprise systems still rely on XML for data interchange.

This converter transforms JSON into well-formed XML. You can customize the root element name, choose how attributes are detected, and control the output format.

How to Use This Converter

  1. Paste your JSON — Enter valid JSON in the input area.
  2. Configure options — Set the root element name, attribute detection mode, and other options.
  3. Review the XML — The converted XML updates in real time as you type or change options.
  4. Copy or download — Click Copy to copy to clipboard, or Download to save as a .xml file.

Attribute Detection Modes

Auto (@ prefix)

Keys prefixed with @ in your JSON become XML attributes. All other keys become child elements. This gives you full control over the output.

All Scalars as Attributes

All primitive values (strings, numbers, booleans) become attributes on their parent element. Objects and arrays become child elements.

All as Elements

Every JSON property becomes a child element. No attributes are used. This produces the most verbose but simplest XML output.

FAQs

Is my data sent to a server?

No. All processing is performed locally in your browser. Your data never leaves your device.

How are arrays handled?

Arrays produce multiple sibling elements with the same tag name. For example, {"items": [1, 2, 3]} becomes <items>1</items><items>2</items><items>3</items>.

What does the @ prefix mean?

JSON keys starting with @ (e.g., @id) are treated as XML attributes. This matches the convention used by many JSON-to-XML converters and the reverse XML-to-JSON tool.

Is this tool free to use?

Yes. This tool is completely free with no usage limits or registration required.