Free Online Tool

JSON to XML Converter — Free, Instant, CDATA-Ready

Turn any JSON object or array into clean, indented, well-formed XML. Attributes, CDATA blocks and repeated elements are all supported — and your data never leaves your browser.

Converts as you type100% private, no uploadsAttributes & CDATA

JSON Input

XML Output

Your XML will appear here the moment you paste JSON...

Have XML instead?

Convert XML into JSON with the same CDATA-safe engine.

XML to JSON Converter

Quick answer: how do I convert JSON to XML?

Paste your JSON above or upload a .json file. Keys prefixed with @ become XML attributes, #text becomes element text, #cdata becomes a verbatim CDATA block and arrays become repeated elements. Copy or download the indented XML — everything runs in your browser, free and without signup.

How JSON maps to XML

Simple, reversible rules that our XML to JSON converter reads back without loss.

JSONXMLUse it for
{ "@id": "1" }<node id="1"/>IDs, versions, namespaces
{ "#text": "Hi" }<node>Hi</node>Text alongside attributes
{ "#cdata": "<b>x</b>" }<![CDATA[<b>x</b>]]>HTML inside RSS or SOAP
{ "item": [1, 2] }<item>1</item><item>2</item>Lists and feed entries

Convert JSON to XML in 3 Steps

1

Paste or upload your JSON

API responses, config files, test fixtures or exported records — objects and arrays both work.

2

Name your root element

Pick the wrapping element and decide whether to include the XML declaration.

3

Copy or download XML

Send the result to a SOAP endpoint, a legacy importer or an RSS generator.

Related Tools You Might Need

Discover other powerful data processing tools from our comprehensive suite, ordered by popularity and usage among our users.

CSV to Excel Converter

Convert CSV files to Excel format instantly with our fast, free online tool.

Most Popular

Remove Duplicates

Remove duplicate rows from your CSV data quickly and efficiently.

Most Popular

JSON Beautifier

Format and beautify JSON data with proper indentation and syntax highlighting.

Most Popular

CSV to JSON Converter

Transform CSV data into JSON format with customizable options.

Available

JSON to CSV Converter

Convert JSON data to CSV format for spreadsheet applications.

Available

Merge CSV Files

Combine multiple CSV files into one with smart column matching.

Available

SQL Query CSV

Query CSV data using SQL syntax directly in your browser.

Available

Email Extractor

Extract email addresses from text, CSV files, or any data format.

Available

JSON to XML FAQs

Paste your JSON into the input box or upload a .json file. The converter builds well-formed, indented XML in your browser as you type, and you can copy it or download it as an .xml file. No signup, no upload, no limits.

Prefix the key with "@". For example { "book": { "@id": "bk101" } } becomes <book id="bk101">. Any key without a prefix becomes a child element instead.

Yes. Use the "#cdata" key and the value is wrapped in a CDATA block and written verbatim — never escaped and never re-indented. This is the safe way to embed HTML inside RSS descriptions or SOAP payloads.

Each array item is emitted as a repeated element with the same name, which matches how XML feeds and API responses normally represent lists. A top-level array is wrapped in a root element with "item" children.

Text values are escaped to &amp;, &lt; and &gt; so the output is always well-formed. Content you place inside "#cdata" is left exactly as written, because CDATA does not require escaping.

Yes by default — the output starts with <?xml version="1.0" encoding="UTF-8"?>. You can switch the declaration off with one toggle if you are embedding the fragment inside another document.

Keys containing spaces or characters that XML forbids are sanitised to underscores, and keys beginning with a digit get a leading underscore, so you always receive a document the parser accepts.

Yes. Conversion runs entirely in local JavaScript inside your browser tab. Your JSON is never transmitted or stored, so it is safe for internal API payloads, customer records and configuration files.

Yes. Our XML to JSON converter shares the same engine and the same @attribute / #text / #cdata conventions, so a round trip returns an equivalent structure.

Typical uses are legacy SOAP and enterprise integrations, RSS and sitemap generation, Android and Java configuration, Office document parts, and any API that still expects XML rather than JSON.

Convert JSON to XML online free. Supports attributes, CDATA blocks, arrays and custom root elements, with instant validation.

Tool
JSON to XML Converter
Category
All JSON tools
Availability
Browser-based tool