Boneyard Tools

JSON to XML Converter

Paste JSON to get well formed XML instantly. Object keys become elements, arrays become repeated tags, and special characters are escaped. Your data stays in your browser.

How to convert JSON to XML

  1. Paste or type your JSON into the input box.
  2. Set the root element name and indent to match your needs.
  3. Copy the XML or download it as an .xml file.

Examples

Object to nested elements

{"name":"Ada","age":36}
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <name>Ada</name>
  <age>36</age>
</root>

Frequently asked questions

Is my data uploaded anywhere?

No. The conversion runs entirely in your browser, so your JSON never leaves your device.

How are JSON arrays turned into XML?

Each array item becomes a repeated element that reuses the key name. A top level array uses <item> elements because it has no key.

Are special characters escaped?

Yes. The characters &, <, > and " are escaped to their XML entities, so the output stays valid.

What happens to keys that are not valid XML names?

Spaces and other invalid characters become underscores, and a name that starts with a digit is prefixed with an underscore.

Can I change the root element or remove the indentation?

Yes. Set any root name you like, and choose two spaces, four spaces, a tab or compact output with no indentation.

How are null values represented?

A null becomes an empty element, for example <note></note>, which keeps the structure intact.

Related tools