Skip to content
Jellykit

JSON to XML

Convert JSON to well-formed, indented XML. Arrays repeat elements, @keys become attributes and invalid names are fixed. Free JSON to XML converter, in-browser.

Runs in your browser. Nothing is uploaded.

About JSON to XML

JSON to XML writes your JSON as indented XML. Object keys become element names, arrays become repeated elements with the same name, and special characters such as & and < are escaped so the result is always well-formed.

It understands the same conventions as our XML to JSON tool: keys starting with @ become attributes and #text becomes element text, so data can round-trip. Keys that aren't legal XML names (spaces, leading digits) are adjusted with underscores.

If the JSON has a single top-level key, that key becomes the root element. Otherwise everything is wrapped in a root element you can name.

How to use JSON to XML

  1. Type or paste your text into the input box. Press Sample to see an example.
  2. Adjust the options. The result updates as you type.
  3. Copy the result, or press Use as input to chain another transformation.

Frequently asked questions

How do I make an attribute?

Prefix the key with @. {"book": {"@id": 1, "title": "Dune"}} becomes <book id="1"><title>Dune</title></book>.

What happens to a top-level array?

It is wrapped in the root element, and each item becomes an element named by the Array item setting.

Is JSON to XML free and private?

Yes. JSON to XML is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.

See all data tools →