Converters

JSON to XML Converter

Paste JSON below to convert it into well-formed XML.

What does this tool do?

Paste JSON below to convert it into well-formed XML. Everything runs locally using JavaScript in your browser — nothing you paste or upload is ever sent to a server.

How to use this tool

  1. Paste your your json into the left-hand box.
  2. Click Convert to XML.
  3. Copy the xml output from the right-hand box.

Frequently asked questions

How do I represent XML attributes in my JSON?

Prefix the key with @, for example "@id": "1" becomes the id attribute on that element.

What becomes the XML root element?

If your JSON has exactly one top-level key, that key becomes the root element name; otherwise the tool wraps everything in a <root> element.

How are arrays converted?

Each item in an array is rendered as a separate sibling element with the same tag name.