Processed locally — your file never leaves your device
JSON to XML Converter
Convert JSON to XML using documented, deterministic rules — entirely in your browser.
How it works
- Paste JSON, or open a .json file.
- Click Convert — object keys become elements, arrays become repeated elements, entirely on your device.
- Any renamed keys (for names that aren't valid XML) are called out as a warning.
- Copy the result or download it, all without anything leaving your browser.
Frequently asked questions
- Is my JSON uploaded anywhere?
- No. Conversion happens entirely on your device, building the XML via your browser's own DOM APIs.
- How are JSON objects and arrays converted?
- Object keys become child elements. A key starting with @ becomes an attribute instead (e.g. "@id" becomes id="..."). A key named #text becomes the element's direct text. An array value becomes repeated sibling elements sharing that key's tag name. The output's root element is always named <root>.
- Can every JSON value be converted?
- Yes — objects, arrays, strings, numbers, booleans and null all produce valid XML (null becomes an empty element). Unlike JSON to CSV, there's no JSON shape this tool has to reject.
- What if a JSON key isn't a valid XML element name?
- It's automatically renamed to a valid one (invalid characters replaced), and you'll see a warning telling you exactly which key was renamed.
- Will converting back to JSON give me the exact same data?
- The structure round-trips, but XML has no native number, boolean or null type — after converting to XML and back, values like 5 or true become the strings "5" and "true". This is a fundamental limitation of XML, not a bug.