Skip to content
Free Tab Toolsnothing uploaded

Runs in your browser · Last updated 4 September 2026

JSON to XML Converter

Turn JSON objects and arrays into indented XML. Runs entirely in your browser.

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <book id="1">
    <title>Dune</title>
  </book>
</root>

How to use this tool

  1. Paste a JSON object or array.
  2. Copy the XML document.
  3. Pretty-print or inspect it in the XML formatter if needed.

Worked example

The sample {"book":{"@id":"1","title":"Dune"}} becomes a root element containing book with an id attribute and a title child.

Frequently asked questions

How do I emit attributes?
Use keys that start with @. "@id": "1" becomes id="1".
What is the root element?
root, unless your JSON is already wrapped in a single named object — we still wrap the value you paste under root for a stable document.
Are arrays repeated elements?
Yes. An array named tag becomes multiple <tag> nodes.
Is output indented?
Yes, two spaces, with an XML declaration.
Can I go back to JSON?
Use XML to JSON. Attribute prefixes round-trip.