Free JSON to XML — no upload, no account

Convert JSON to XML
Custom tags, attributes,
CDATA — your way.

Free JSON to XML converter. Set the root tag and item tag for arrays, use @ keys as attributes, optional CDATA wrapping. Runs entirely in your browser — your JSON never leaves your device.

Your data never leaves your browser
Custom root and item tags
@ keys become XML attributes
CDATA wrapping option
Always free
JSON to XML Converter   100% client-side
Conversion uses vanilla JavaScript — no external library, no data upload.
JSON input
  XML ready

      
How to convert JSON to XML

Three steps — paste your JSON and get valid XML in seconds.

1
Paste or upload your JSON

Paste a JSON object or array, or upload a .json file. The converter accepts any valid JSON — nested objects, arrays of objects, mixed structures. Keys prefixed with @ will automatically become XML attributes in the output.

2
Set tag names and options

Choose the root element name that wraps the entire output, and the item tag used for array elements. Toggle the XML declaration, select whether to escape special characters or wrap them in CDATA sections, and choose indented or minified output.

3
Copy or download the XML

Click Convert and copy the XML to clipboard or download a .xml file. The output is well-formed XML that validates in any XML parser, XSLT processor or schema validator.

How JSON maps to XML

The key structural decisions when converting JSON to XML.

JSON objects map naturally to XML elements — each key becomes a child element and each value becomes the element's text content or its own subtree of child elements. The main challenge is that XML requires a single root element, while a JSON array has no root — you supply the root tag name yourself.

Arrays are the other key mapping. JSON arrays have no element name, but XML repeated elements need a tag. JSONshift uses the item tag setting — if your JSON has a key users containing an array, each element becomes a <user> (or whatever item tag you set).

Attributes are handled via the @ prefix convention — the same convention used by the XML→JSON direction in reverse. A JSON key @id becomes the XML attribute id="…" on the parent element, while non-@ keys become child elements. This makes the JSON→XML and XML→JSON conversions fully reversible.

When do you need JSON to XML?

Common workflows where XML output is required.

SOAP and legacy API integration

Modern back-ends often store data as JSON but need to communicate with legacy SOAP services that require XML payloads. Converting JSON to XML lets you build the request body without a dedicated XML library in your stack.

Data export to XML formats

EDI, XBRL, HL7 and many government data standards require XML submission files. Converting a JSON data structure to XML is the first step before applying an XSLT transform or validating against an XML Schema (XSD).

Configuration files

Maven, Spring, Ant and many other build and framework tools use XML configuration. Converting a JSON config structure to XML lets you prototype the configuration in a more readable format before committing to the XML file.

RSS and Atom feed generation

Generating a syndication feed from a JSON data source — a blog post list, product catalogue or news feed — requires XML output. Converting the JSON to XML produces a feed structure that can be further styled with XSLT or served directly.

Conversion options explained

What each setting controls in the XML output.

OptionValuesWhat it does
Root tag Any valid XML name The outermost element that wraps all output. XML requires exactly one root element — this is it. Use a descriptive name like users, feed or response rather than the generic root.
Item tag Any valid XML name The element name used for each item in a top-level JSON array, or for items in nested arrays. If your JSON root is an array of user objects, setting this to user produces <user>…</user> for each element.
XML declaration Include · Omit Include prepends <?xml version="1.0" encoding="UTF-8"?> — required by strict XML parsers and SOAP processors. Omit produces a plain XML fragment suitable for embedding in a larger document.
Special characters Escape · CDATA Escape replaces &, <, >, " and ' with their XML entities — the standard approach. CDATA wraps values containing special characters in <![CDATA[…]]> sections — preserving the raw content, useful for HTML fragments or code snippets.
Formatting Pretty · Minified Pretty indents child elements with 2 spaces per level — human-readable and easy to inspect. Minified removes all inter-element whitespace — smaller payload for transmission or storage.
Related JSON tools

Other free converters you might need next.

Popular searches
json to xml converter convert json to xml online json to xml free json to xml javascript convert json to xml python json array to xml json to xml with attributes json to xml custom root tag convert json to xml online free json to soap xml json to xml converter online transform json to xml json to xml cdata

JSON converted in
your browser. No upload.

The entire conversion runs in JavaScript locally. Your JSON is parsed, traversed and serialised to XML entirely in your browser — it is never transmitted to any server, never stored, and gone the moment you close the tab.

The output is well-formed XML: all special characters are escaped or wrapped in CDATA, element names are validated, and the structure follows the XML 1.0 specification. The output validates in xmllint, Saxon and any standard XML parser.

Reversible with XML → JSON
Uses the same @ attribute convention as the XML→JSON tool — converting back and forth produces the original structure.
Well-formed output
All special characters escaped, element names sanitised, single root element enforced — validates in any XML parser.
CDATA support
Values with HTML fragments, code snippets or special characters can be wrapped in CDATA sections instead of escaped.
47 tools, always free
No file size limits, no watermarks, no account. Funded by non-intrusive display advertising only.
Frequently asked questions
Common questions about converting JSON to XML online.
How do I convert JSON to XML?
Paste your JSON or upload a .json file, set the root tag and item tag for array elements, then click Convert. Copy or download the .xml output instantly. The conversion runs entirely in your browser — no upload required.
How are JSON arrays converted to XML?
Each element of a JSON array becomes a repeated XML element using the item tag name you set. For example, an array under the key "users" with item tag "user" produces <users><user>…</user><user>…</user></users>. For a top-level array the root tag wraps all items directly.
How do I make JSON keys become XML attributes?
Prefix the key with @ in your JSON. For example {"@id": "1", "name": "Alice"} produces <item id="1"><name>Alice</name></item>. This is the same @ convention used by the XML→JSON direction — making the two tools fully reversible.
What characters are automatically escaped in the XML output?
The standard XML entities are applied automatically: & becomes &amp;, < becomes &lt;, > becomes &gt;, " becomes &quot;, and ' becomes &apos;. Alternatively, enable CDATA wrapping to preserve raw values containing these characters inside CDATA sections.
Is my JSON data safe when using this converter?
Yes. The conversion runs entirely in your browser using JavaScript. Your JSON is never uploaded to any server. Open the Network inspector during conversion and you will see zero outbound data requests.
Is the JSON to XML converter free?
Yes, completely free. No file size limits, no account required. JSONshift is funded by non-intrusive display advertising.
Go up