JSON to XML
Convert JSON to well-formed, indented XML. Keys starting with "@" become attributes.
JSON
Paste JSON above, or upload a .json file.
XML
How to use JSON to XML
- Paste your JSON or upload a file.
- Click Convert to XML.
- Copy the XML or download it.
Frequently asked questions
How do I create XML attributes?
Start the key with "@". For example {"item": {"@sku": "P1", "#text": "Pen"}} becomes <item sku="P1">Pen</item>.
Why was my data wrapped in a <root> tag?
XML must have exactly one outer tag. If your JSON has several top-level keys, or is a list, it is wrapped in <root> to make valid XML.
Why did I get an error about a tag name?
XML tag names cannot contain spaces or start with a digit. Rename that key in your JSON and try again.
Is my text uploaded to a server?
No. This tool runs entirely in your browser, so what you paste never leaves your device.