Sign up free

JSON to XML Converter

Turn JSON into well-formed, indented XML with a root element you choose.

or drop files here

Accepts JSON

Runs in your browser. Your files never leave your device.

About JSON to XML

JSON to XML is for feeding modern data into systems that still expect XML: an ERP or banking import, a SOAP request, an e-invoicing gateway, a product feed. Paste JSON or open a file and indented XML with a UTF-8 declaration appears as you type, while the Root element box sets the outer tag. Rows kept in Excel or CSV can go straight to XML with CSV to XML.

Each key becomes an element, and arrays become repeated elements with the key's name, so a tags list with two values gives two <tags> elements. Keys that start with @ become attributes and a #text key becomes the element's text, the same conventions XML to JSON uses. Characters like & and < are escaped, and names that aren't valid XML are cleaned up. All of it runs in your browser.

How to use JSON to XML

  1. 1
    Paste or open JSON

    Paste into Input or open a .json file. Example shows how @ keys turn into attributes.

  2. 2
    Name the root element

    Type a name in Root element; root is used if you leave it as it is.

  3. 3
    Copy or save the XML

    The JSON to XML result updates live. Copy it or Save it as an .xml file.

Why use Cubfile for this

  • Root element you choose

    Wrap the output in <orders>, <catalog> or whatever the receiving system expects.

  • Attributes from @keys

    "@id": 7 becomes id="7" on the element, matching what XML to JSON produces.

  • Always well-formed

    Special characters are escaped and invalid names are fixed, so parsers accept the result.

  • No upload, no task count

    The conversion happens in your browser and is free to repeat.

FAQ

JSON to XML: questions and answers

How does JSON to XML handle arrays?
An array becomes a run of elements named after its key, one per item. Items of a top-level array are wrapped as <item> elements inside the root.
Why is my root element not called root?
When the JSON is an object with a single key that doesn't hold an array, that key becomes the root and the Root element box is ignored. Wrap the data in another object if you want a different outer tag.
How do I add attributes when converting JSON to XML?
Prefix the key with @. For example, a book object with "@id": "b1" and a title gives <book id="b1"> with a <title> element inside.
Is my data uploaded when I convert JSON to XML?
No. Your browser builds the XML locally, so the JSON never reaches our servers.
Does the JSON to XML converter cost anything?
No. It runs in the page, so it's free, needs no account and never uses one of your daily tasks.
Share JSON to XML with a friendIt runs in any browser, and they can try it without signing up.

Related tools

XLSSQL Excel to SQLGenerate CREATE TABLE and INSERT statements from Excel or CSV.
XMLXLS XML to ExcelTurn repeating XML records into spreadsheet rows.
CSVXLS CSV to ExcelOpen CSV and TSV data in Excel with the right columns and encoding.
CSVJSON CSV to JSONConvert CSV to JSON in your browser. Nothing is uploaded.
CSVXML CSV to XMLConvert CSV or Excel rows into XML records.
XLSCSV Excel to CSVSave each sheet as CSV, line breaks in cells handled.
XLSHTML Excel to HTMLTurn a sheet into an HTML table you can paste into a page.
XLSJPG Excel to ImageSnapshot sheets and charts as images.