JSON to XML Converter
100% PrivateData & JSON ToolsConvert JSON into well-formed XML using a documented, deterministic mapping.
Runs entirely in your browser. Your input is not uploaded to Ovatly or anywhere else.
- 1Paste your JSON into the input box.
- 2Set the root element name if the default does not fit.
- 3Press Convert to XML.
- 4Copy the XML or download it as converted.xml.
Input: {"person":{"@id":"7","name":"Ana","tag":["a","b"]}} Output: <?xml version="1.0" encoding="UTF-8"?> <root> <person id="7"> <name>Ana</name> <tag>a</tag> <tag>b</tag> </person> </root>
- Mapping: @key becomes an attribute on the parent element, #text becomes text content, arrays repeat the element once per item, and null becomes an empty element.
- Keys that are not valid XML names have invalid characters replaced with underscores, and a key starting with a digit gets an underscore prefix.
- The output is one consistent dialect of XML. Systems expecting a specific schema (namespaces, element order rules) may need further adjustment.
Name the JSON key with an @ prefix, for example "@id": "7" inside the object that should carry the attribute.
About this tool
The JSON to XML Converter writes well-formed XML from JSON using a documented, deterministic mapping: keys become elements, keys starting with @ become attributes, and arrays repeat their element. You choose the root element name.
Related tools
Part of Ovatly's free tools in Data & JSON Tools.