Skip to content
OnlineToolStudio

JSON to XML Converter

runs in your browserno sign-upfree

Convert JSON data into clean, well-formed and indented XML online.

Converted to XML

JSON261 chars
XML

About this tool

This converter turns JSON into well-formed, indented XML. Objects become elements, arrays become repeated elements, and keys starting with "@_" become attributes. Invalid characters in key names are fixed automatically so the XML is always valid.

How to use

  1. Paste your JSON into the JSON box.
  2. Set the root element name, indent and whether to add the <?xml ?> declaration.
  3. Copy the XML or download it as an .xml file.

FAQ

Which element is used as the root?

If your JSON has a single top-level key (like {"catalog": {...}}), that key becomes the root element. Otherwise everything is wrapped in the root element name you choose ("root" by default).

How are attributes and lists represented?

Keys that start with "@_" are XML attributes (for example "@_id": 7 becomes id="7"), "#text" holds the text of an element that also has attributes, and a JSON array becomes repeated elements with the same name. The same rules are used in both directions, so data converts back and forth cleanly.

Is my data uploaded?

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

Related tools

All tools