Encode text to Base64, with correct Unicode handling.
Open toolJSON to XML
Convert JSON into well-formed XML, following the @attribute / #text convention.
XML output will appear hereWhat is a json to xml?
This tool converts JSON back into XML, following the same @attribute and #text convention used by XML to JSON - so round-tripping data between the two formats produces consistent, predictable results. Arrays become repeated sibling elements automatically.
How to use this tool
- 1Paste JSON shaped like { "root": { ... } }, or upload a .json file.
- 2If your JSON has more than one top-level key, set a Root tag name to wrap them under a single element.
- 3Click Convert to generate well-formed XML with proper indentation.
- 4Copy the XML or download it as a .xml file.
Common use cases
Frequently asked questions
How do I add XML attributes from JSON?
Use a key prefixed with @, like { "@id": "42" } - it becomes an id="42" attribute on that element rather than a child element.
How do I set element text content alongside attributes?
Use a #text key - for example { "@currency": "USD", "#text": 29.99 } produces <price currency="USD">29.99</price>.
What does the Root tag field do?
If your JSON has a single top-level key, that key becomes the XML root element automatically and the Root tag field is ignored. If there are multiple top-level keys, they're wrapped inside an element named after the Root tag field.
Is special XML content escaped correctly?
Yes - characters like &, <, >, and " are escaped in text and attribute values so the output is always valid XML.
{
"runs_in_browser": true,
"data_sent_to_server": false,
"signup_required": false,
"price": "free",
"category": "Encoding"
}