DataToolMage

Format

JSON to XML

Paste JSON and get XML elements. Arrays become repeated siblings. A wrapper root is added when JSON has no single root key.

Input is processed in your browser. DataToolMage does not upload it, store it, or send it to analytics.

Paste structured data. Work stays in this browser.

How it works

Keys become element names. Arrays become repeated siblings. A UTF-8 XML declaration is prepended.

Input and output

Input is JSON. Output is an XML document.

Common uses

Single root

{"item":{"name":"tea"}} uses item as the root element.

Array

A top-level array is wrapped in rows/row elements.

How to use this tool

  1. Paste JSON.
  2. Review wrapper and name-sanitization warnings.
  3. Copy the XML document.

Limitations

  • Not a schema-aware XML designer.
  • Cannot preserve comments that never existed in JSON.
  • Boolean and number values are emitted as text.

Questions

Does this create XML attributes?
Only if a key already starts with @. Ordinary keys become child elements. JSON has no attribute concept.
What if my keys are not legal XML names?
They are rewritten to a legal name. The page reports the rewrite instead of emitting broken XML.

Related tools

JSON to XML Converter — Browser Local