Free JSON to XML Converter

Convert JSON into indented XML, instantly and entirely in your browser.

How to convert JSON to XML

  1. 1

    Paste your JSON

    Paste any valid JSON — an object, an array, or a nested structure — into the input box.

  2. 2

    Set a root tag (optional)

    If your JSON is a top-level array or scalar, name the wrapping root element; objects use their own keys as tag names.

  3. 3

    Copy or download

    Click "Copy XML" to grab the text, or "Download .xml" to save it as a file.

Example use cases

1

Feeding a legacy XML API

Turn a JSON payload from a modern service into the XML format an older system or SOAP endpoint expects.

2

Generating test fixtures

Quickly produce sample XML from JSON test data without writing a serializer.

3

Migrating configuration

Move settings stored as JSON into an XML-based config format.

Frequently asked questions

What does this converter do?

It walks your JSON and builds a matching, indented XML tree — objects become nested elements, arrays repeat an element once per item, and scalars become element text.

How are arrays represented?

Each item in an array becomes its own element using the array's key as the tag name, repeated once per item — e.g. "tags": ["admin", "user"] becomes two <tags> elements.

What happens to keys that aren't valid XML tag names?

Keys with spaces or characters XML doesn't allow in a tag name are sanitized — invalid characters are replaced with an underscore so the output always parses.

Is my data uploaded anywhere?

No. Conversion happens locally in your browser using JavaScript — nothing you paste is sent to a server.