Convert JSON to XML, directly in your browser, using a clear and consistent attribute/element convention.
Your JSON is processed locally in your browser and is not uploaded to our server.
How XML and JSON Map to Each Other
XML and JSON are structured differently — XML has elements and attributes, JSON has objects and arrays — so converting between them needs a consistent convention, not a literal one-to-one translation. This tool uses the same convention most XML/JSON converters use:
- An element’s attributes become an
@attributesobject. - An element’s direct text content (when it also has attributes or children) becomes a
#textvalue. - Multiple sibling elements with the same tag name become a JSON array.
- The single XML root element becomes JSON’s one top-level key.
One Honest Limitation
XML has no native number, boolean, or null types — everything in XML is text. This means a JSON true, false, or a number will come back as the literal text “true”, “false”, or the number’s digits after converting to XML and back — this is a property of the XML format itself, not a bug in this tool.
FAQ
Is my JSON uploaded anywhere?
No. The conversion happens entirely in your browser using JavaScript. Your data is never sent to our server.
How are JSON arrays represented in the XML output?
Each array item becomes a separate sibling element sharing the same tag name as the array’s key.
What happens to a JSON object with more than one top-level key?
Since XML needs exactly one root element, the output is wrapped in a generic element in that case.