Follow Us

JSON to XML Converter

Get valid, nicely indented XML from any JSON. Choose the root and item names, turn @keys into attributes, and download an .xml file.

XML Output
XML to JSON

Runs in your browser — your code is never uploaded. Tip: drop a file on the input box, or press Ctrl + Enter.

How to Convert JSON to XML

Valid XML from JSON in three steps.

1

Paste or Upload JSON

Paste JSON or upload a .json file.

2

Set Names

Choose the root element and the name for list items. Keys starting with @ become attributes.

3

Copy or Download

Copy the XML or download data.xml.

Output

Valid, escaped XML

Attributes

From @keys

Indent

2, 4, tabs or none

Privacy

Runs in your browser

Works on

Phone & computer

Price

100% free

How JSON Maps to XML

The rules this converter follows.

JSONXML
{"name":"Asha"}<name>Asha</name>
{"@id":"b1"}id="b1" attribute
{"#text":"Hi"}Text content of the element
{"tag":[1,2]}<tag>1</tag><tag>2</tag>
nullEmpty element <tag/>
& < > "&amp; &lt; &gt; &quot;
Key with spaces, e.g. "first name"<first_name> (made a valid XML name)

What Can You Use It For?

Popular ways people use JSON to XML Converter.

Legacy Systems

Send data to SOAP services and older APIs that need XML.

Feeds

Build RSS, sitemaps or product feeds from JSON data.

E-invoicing & Finance

Prepare XML for invoicing and banking formats.

Config Files

Create XML config for Android, Maven or .NET.

Tips for the Best Result

  • Use keys like "@id" in your JSON to create XML attributes.
  • If the JSON has one top-level key, it becomes the root element automatically.
  • Convert back with XML to JSON — it uses the same @ and #text rules.
  • Check your JSON first with the JSON Validator if you get an error.

Frequently Asked Questions

Quick answers about JSON to XML Converter.

Paste your JSON and the XML appears instantly. Set the root and item names if needed, then copy or download it.

Each item becomes a repeated element with the same name. A top-level array is wrapped in the root element, using the List item name.

Start the key with @. For example {"book":{"@id":"b1"}} gives <book id="b1"/>.

Yes. &, <, > and quotes are escaped, so the XML is always valid.

Spaces and symbols are replaced with underscores, and names that start with a number get an underscore in front.

Yes, untick XML declaration to leave out <?xml version="1.0"?>.

No. Everything runs in your web browser, so your code and data never leave your device.

Yes — 100% free, with no sign-up and no limits.

Related Free Tools

Ready to Use JSON to XML Converter?

Scroll up and get your result in seconds. 100% free, no sign-up needed.

Start Now

Ad Blocker Detected

Toolszu provides free access to over 1,000 tools. We rely on minimal ads to maintain our servers and keep improving the site for everyone.

Please pause or disable your ad blocker to continue using Toolszu.

or
Go ad-free — from $19/year

Already have a plan? Sign in