JSON to XML

Convert JSON data into XML format.

Input data is processed in your browser
Data is never sent to a server

Tool

0 chars

or drag & drop a file

What is JSON to XML?

JSON to XML converts JSON data into XML format. Keys prefixed with “@” become attributes, and a “#text” key becomes the element’s text content. Useful for reversing output from the XML to JSON tool, or passing JSON-based configuration into an XML-based system.

How to Use

  1. Paste JSON text into the input field (the root must be an object with a single key).
  2. Click "Convert" to transform it into XML.
  3. Customize the attribute key prefix, text key name, and whether to include an XML declaration.
  4. Click "Copy Result" to copy to clipboard.

FAQ

What format should the JSON be in?

The root object must have a single key, which becomes the root element name (e.g. {"user": {...}}). This is compatible with output from the XML to JSON tool.

How are attributes specified?

By default, keys prefixed with "@" are treated as attributes (e.g. "@id": "1" becomes id="1"). The prefix can be customized.

How are arrays converted?

Arrays produce repeated elements with the same tag name.

Is my data sent to a server?

No. All processing happens in your browser.