Skip to content
migration.tools
JSON to XML

JSON to XML converter

Convert JSON into well-formed XML with the element names you choose. Useful when a partner integration, SOAP endpoint or product feed still wants XML and your system speaks JSON.

Going the other way? XML to JSON

Options
Used when the input is a list.

JSON

XML

The result appears here as soon as there is input.

Processed on this device. Nothing you paste or drop is uploaded.

How to use it

  1. 1Paste your JSON or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the XML or download it. Drop several files to convert a batch into one ZIP.

How JSON becomes XML

JSON and XML both describe nested data, so structure carries over directly: objects stay objects, lists stay lists, and key order is kept.

The differences are in the details each format can express — comments, nulls, dates and attributes — and the notes under the output tell you whenever something had to be adapted.

JSON and XML, briefly

JSON is the default language of web APIs and document databases. It nests objects and arrays to any depth and distinguishes strings, numbers, booleans and null, but has no comments and no date type.

XML describes documents with nested elements and attributes. It still runs enterprise integrations, SOAP services, product feeds, sitemaps and many government and banking formats.

Questions

What if my JSON isn't an array of objects?

The converter looks for the list of records inside the document — for example the array under "data" or "items" in an API response — and tells you which one it used. A single object becomes one row.

What do the element names look like?

Each field becomes an element named after its key. Characters that aren't legal in XML names are replaced with underscores, keys starting with @ are written as attributes, and you choose the names of the root and row elements.