JSON to XML Converter
Convert JSON into XML, right in your browser. @attr keys become attributes, a #text key becomes text content.
This file is processed in your browser and never uploaded to a server.
How It Works
1. Drop your file here
2. Processing…
3. Download
Features
- Supports attributes and nested elements
- Paste text or upload a .json file
- Copy or download the result
Frequently Asked Questions
- Why does my JSON need exactly one root key?
- XML documents can only have a single root element, so the top-level JSON object must have exactly one key to map to it.
- How do I add XML attributes?
- Use keys prefixed with @ in your JSON, e.g. "@id": "1" becomes the attribute id="1".
- How are JSON arrays converted, since XML doesn't have an array type?
- Each array item becomes a separate sibling element with the same tag name — e.g. "item": [1, 2] becomes <item>1</item><item>2</item> — mirroring how the XML to JSON converter combines repeated tags back into an array.
- What does a null value in my JSON become in the XML output?
- It becomes a self-closing empty tag, e.g. "note": null turns into <note />, since XML has no direct equivalent of JSON's null.
- Can I mix text and child elements under the same key, and will the order be preserved?
- Partially — a "#text" key's value is always written before any child elements regardless of where it appears in your JSON, so exact mixed-content ordering isn't guaranteed to match the source.
Related Tools
Add this tool to your website
Copy the code below and paste it into any page. It's free, needs no sign-up, and files are processed in your visitors' own browsers.