JSON to XML Converter: Free Online Tool

This JSON to XML converter turns JSON objects and arrays into well-formed XML for feeds, SOAP and legacy APIs, config files and data imports. Arrays become repeated tags, keys that start with @ become attributes, #text becomes element text, and null values become empty tags. Keys that are not valid XML names, such as "first name" or "2026", are made safe automatically, and special characters like & and < are escaped. Choose a root tag, the tag name for array items, indentation and whether to add the XML declaration. It runs in your browser, so your data stays on your device.

JSON to XML Converter

Convert JSON to well-formed XML with a root tag, attributes from @ keys, arrays as repeated tags and safe escaping.

Everything runs in your browser. Nothing you type is sent to a server.

How to use the JSON to XML Converter

  1. Paste JSON or open a .json file.
  2. Set the root tag and item tag if you need them.
  3. Read the XML output.
  4. Copy it or download an .xml file.

Features

  • Arrays become repeated tags
  • @ keys become attributes, #text becomes text
  • Safe tag names and escaping
  • Custom root and item tags
  • Indented or minified, optional XML declaration
  • Private, runs in your browser

Frequently asked questions

How do I convert JSON to XML?

Paste JSON into the input. The XML appears right away. Copy it or download it as an .xml file.

Why does XML need a root element?

An XML document must have exactly one root element. If your JSON has one top-level key, it becomes the root. Otherwise the tool wraps it in the root tag you choose.

How do I make XML attributes from JSON?

Start the key with @. For example {"book":{"@id":7,"title":"Atlas"}} becomes a book element with the attribute id="7" and a title child element.

What happens to keys with spaces?

Characters that are not allowed in XML names are replaced with an underscore, and names that start with a digit get a leading underscore.

Is my JSON uploaded?

No. The conversion runs in your browser.