@ become attributes (e.g., {"user":{"@id":"7","name":"Ada"}}), and #text becomes the element text node.<item>...</item> (or your chosen Array item tag).How to use
Use it as a quick JSON → XML generator.
- Paste valid JSON into the input box.
- Set the Root tag (and Array item tag if your JSON has arrays).
- Choose Pretty or Minify, and optionally include the XML declaration.
- Click Generate XML, then copy or download the result.
FAQ
What input does this XML generator accept?
It accepts valid JSON (object or array) and converts it into XML under your chosen root tag.
How do I add XML attributes in the JSON?
Use keys that start with @, for example {"user":{"@id":"7","name":"Ada"}} → <user id="7">...</user>.
How are JSON arrays converted to XML?
Arrays become repeated elements using the Array item tag (default: item) inside the array’s property element.
Can I generate minified XML?
Yes—uncheck Pretty to generate compact XML without indentation and extra whitespace.
Does this validate my XML against an XSD?
No—this tool generates XML. For validation/formatting/XPath workflows, use the XML tools page linked under the output.
What if my JSON keys aren’t valid XML tag names?
The tool sanitizes keys by replacing invalid characters with underscores and ensuring the name starts with a valid character.
Is my data sent to a server?
No. Generation runs locally in your browser; the tool does not make network requests.