Blog
Image Tools
Crop Image
Resize Image
Rotate & Flip
Compress Image
Photo Filters
Meme Generator
GIF Maker
Collage Maker
Watermark Image
Blur Image
Convert
JPG to PNG
PNG to JPG
HEIC to JPG
DNG to JPG
Image Converter
PDF to JPG
JPG to PDF
Merge PDF
Compress PDF
MP4 to MP3
Video to GIF
MOV to MP4
MP3 Converter
Video & Audio
Trim Video
Crop Video
Remove Audio
Text to Speech
Audio Cutter
MP3 Compressor
Design & Editor
Resume Builder
Design Editor
Add Text to Photo
Social Media Resizer
QR Code Generator
Signature Generator
More Tools
Word Counter
Password Generator
Random Picker
Dice Roller
Spinner Wheel
Favicon Generator
Barcode Generator
Browse All Tools

JSON to XML Converter

Turn JSON into clean, well-formed XML for older systems, feeds and data exchanges that do not speak JSON. Pick the root element name, turn keys starting with @ into attributes, and get neatly indented or compact output.

100% Free
No Sign-up
Attributes
Custom Root
Private · Nothing Saved Online
JSON to XML
Your Text
Input Characters—
Output Characters—
Lines In → Out—
Input Words—
Type or paste in the input box, or open a file. The result updates as you type.
XML to JSON
JSONType, paste or drop a file
XML
Input—
Result—
Status—
Settings forYour data
Root Element
The whole document is wrapped in this element.
Options
File Name

How to Convert JSON to XML

Quick answer: paste your JSON, set the root element name, then download the .xml or copy it.

  1. 1

    Add your JSON

    Paste it or open a .json file.

  2. 2

    Name the root

    The element that wraps everything.

  3. 3

    Choose options

    Attributes, declaration, indentation.

  4. 4

    Download .xml

    Or copy it.

What You Get

Well-Formed
Valid XML every time
Attributes
From @ keys
Arrays
Repeated elements
Instant
As you paste
Private
Nothing is uploaded
Any Device
Phone or computer

Why Convert JSON to XML?

Many established systems still exchange data as XML: banking and payment formats, government and tax submissions, supplier catalogues, publishing feeds, office documents and enterprise software. When your data is in JSON, converting it to XML lets you feed those systems without rewriting anything by hand.

How JSON Maps to XML

Each JSON key becomes an element with the same name, and its value becomes the element's content. Objects become nested elements, and arrays become the same element repeated, so "book": [ … ] becomes several <book> elements. Keys starting with @ become attributes of their parent element, so "@id": "b1" becomes id="b1". A key named #text becomes the text content of an element that also has attributes. Null values become empty elements.

Valid Element Names

XML names cannot contain spaces or most symbols, and cannot start with a digit. The converter replaces invalid characters with underscores and adds an underscore in front of names that start with a digit, so the output is always well-formed. Special characters in values, such as & and <, are escaped automatically, as in "Paper &amp; Ink".

Example

The sample catalogue becomes <root><catalog version="2"><book id="b1"><title>The Silent Sea</title>…, with each book as its own element and the IDs as attributes. Set the root name to "export" and the outer element changes to <export>. To read XML back into JSON, use XML to JSON.

Who Converts JSON to XML?

Developers connecting modern apps to older systems, integration teams preparing feeds for partners, e-commerce managers building product feeds, publishers producing XML for distribution, and students learning the differences between data formats. Converting in the browser keeps business data private.

Step by Step

Paste your JSON or open a file. Type the root element name your target system expects; check its documentation if unsure. Keep attributes on if your JSON uses @ keys. Leave the declaration line on for files, and tick minify for compact messages. Download the .xml file or copy it. If the JSON is invalid, a message shows where the problem is.

Good to Know

JSON and XML are not identical: XML has no real numbers or true/false values, so everything becomes text, and the order of elements follows the order of keys in your JSON. A top-level array is written as repeated <item> elements inside the root. To check the JSON first, use the JSON Formatter.

Real-World Scenarios

A supplier asks for your product list as an XML file, but your shop exports JSON. Paste the export, set the root name to "products", and each product becomes a <product> element with its fields inside. Another common case is a payment or accounting system that only accepts XML messages: build the message in JSON, where it is easier to write, then convert it here and paste the XML into the request. Teachers also use the converter to show students how the same data looks in both formats side by side, which makes the differences in structure and syntax easy to explain.

Private, Free and Instant

The converter is free and works with files up to 5 MB. There is no sign-up, no row limit beyond the 5 MB file size and nothing to install. The conversion runs in your browser, so customer lists, exports, settings files and other private data are never uploaded or stored. You can open a file from your device, paste data straight from another program, and download the result with the right file extension. It works on Windows, Mac, Linux, Chromebooks, iPhone and Android.

JSON to XML: Building Markup From Data

Some older systems and enterprise interfaces still require XML. Converting JSON produces elements for each key.

Mapping rules

Object keys become element names, arrays repeat the element, and values become text. Keys that are not valid XML names, such as those starting with digits or containing spaces, must be changed.

Always check the result against the schema the receiving system expects. For the opposite direction, use XML to JSON.

Frequently Asked Questions

Questions about JSON to XML

How do I convert JSON to XML?

Paste your JSON, choose the root name and download the .xml file.

How are arrays converted?

Each item becomes a repeated element with the array's key as its name.

Can I create attributes?

Yes. Keys starting with @ become attributes of their parent element.

Is the XML valid?

Yes. Names are made valid and special characters are escaped.

How large can my file be?

Up to 5 MB of text, which is tens of thousands of rows for most data.

Is my data uploaded?

No. The conversion happens in your browser on your own device. Your data is never sent or stored.