FreeJSON → XML

JSON to XML Converter

Turn JSON into a well-formed XML document, with attributes and repeated elements.

Runs in your browser. Files never leave your device.

CSV, TSV, Excel (.xlsx), JSON or XML · several at once · or drop them here

Converted on your device — files are never uploaded.

Quick answer

To convert JSON to XML, add the .json file, choose indented or compact output and press Convert. Each key becomes an element, arrays become repeated elements, keys starting with @ become attributes and #text becomes element text. A <root> element is added when the JSON has no single top-level key. It runs in your browser.

Step-by-Step Guide

How to convert JSON to XML

1

Add your JSON

Choose one or more .json files. CSV and Excel files work too.

2

Choose the layout

Indented XML for reading, compact for the smallest file.

3

Convert

The XML is built in your browser and shown for a quick check.

4

Download

Save the .xml file, or a ZIP of several.

Well-formed XML from any JSON

Each JSON key becomes an element holding its value, and an array becomes the same element repeated once per item, so {"book": [{…}, {…}]} gives two <book> elements. Keys starting with @ become attributes and #text becomes the element's text, the same convention XML to JSON uses, so documents convert back and forth without losing their shape. null becomes an empty element.

XML is stricter about names than JSON, so keys are made into valid element names: spaces become underscores and names starting with a digit get an underscore in front. Special characters in values are escaped. When the JSON is a single object with one key, that key is the root element; otherwise everything is wrapped in <root>, and a top-level array becomes <item> elements inside it.

Spreadsheets can go to XML too: add a CSV or Excel file and each row becomes a row element with one child per column, with root and row element names you choose. Nothing is uploaded.

Last updated

Why Use Ripify JSON to XML

Attributes from @keys

{"@id": 7} becomes id="7".

Repeated elements

Arrays become one element per item.

Valid names

Keys are made into legal element names.

Indented or compact

Readable XML or the smallest file.

From spreadsheets too

CSV and Excel rows to XML, with your element names.

Private

Converted on your device.

Frequently Asked Questions

JSON to XML FAQ

How do I make XML attributes from JSON?▼
Start the key with @: {"book": {"@id": 7, "title": "Dune"}} becomes <book id="7"><title>Dune</title></book>.
What happens to JSON arrays?▼
An array under a key becomes that element repeated, one per item. A top-level array becomes <item> elements inside <root>, and a list directly inside another list is wrapped in an element holding <item> children.
What is the root element?▼
If the JSON is an object with a single key holding an object, that key is the root. Otherwise the document is wrapped in <root>.
Can I convert CSV or Excel to XML?▼
Yes. Add the file and choose XML: each row becomes a row element with a child element per column, named from the header row. You can rename the root and row elements.

More Free Tools from Ripify