Runs on your device · Your file never leaves your device.
Paste or drop JSON and get an XML document with a declaration on top, a <root> element, and one element per key. A list becomes repeated elements named after its key — "items": [..] gives several <items> elements — and a top-level list becomes <item> elements under <root>.
The output is deliberately simple: no attributes are generated, every value is text inside its element, null becomes an empty element, and the document is indented two spaces per level so it is readable in any editor. Keys that XML does not allow as names — starting with a digit, containing spaces or symbols — are sanitised with underscores so the result always parses.
Text is escaped correctly (& < > and control characters), the encoding is UTF-8, and you see the first 200 lines before downloading. Nothing is uploaded.
How to convert JSON to XML
Drop a JSON file, or paste JSON into the box.
Press Convert to XML.
Check the preview and download the .xml.
Supported formats and limits
Input
JSON (.json) — a file or pasted text
Output
XML 1.0, UTF-8, declaration on top, pretty-printed
Root
<root>; a top-level list becomes <item> elements
Lists
Repeated elements named after the key
Where it runs
In your browser; nothing uploaded
Not for: Matching a specific XML schema (SOAP, RSS, an invoice standard) — the element names follow your JSON keys, not a schema.
Frequently asked questions
Are my files uploaded to a server?
No. This conversion runs entirely inside your browser using your own device’s processing power. The file never leaves your computer or phone, which is why it also works when your connection drops.
How are lists represented?
As repeated elements. {"items": [1, 2]} becomes <items>1</items><items>2</items>. A list at the very top of the document becomes <item> elements inside <root>. An empty list produces no element at all.
What about keys with spaces or digits?
XML element names cannot start with a digit or contain spaces. Such keys are sanitised: "1st place" becomes _1st_place, "unit price" becomes unit_price. Everything else is kept as is.
Can I get attributes instead of child elements?
No — this converter always writes child elements, which keeps the mapping unambiguous and reversible with the XML to JSON tool.