Home › JSON → XML Converter — Free Online Tool | Wgajaa
⇄ JSON → XML Converter
Convert JSON objects into well-formed XML documents. Free, private and instant — nothing you enter is sent anywhere.
About this tool
This JSON to XML converter transforms JSON objects and arrays into well-formed XML you can paste into config files, SOAP payloads or legacy integrations. Paste JSON on the left and the equivalent XML tree appears on the right as you type.
The mapping is predictable: object keys become element names, arrays repeat their child element, and scalar values become text content. Keys that are not valid XML names are sanitized, and attributes are never used, so the round trip back to JSON stays unambiguous. The output is indented for readability and ready to copy in one click.
How this tool works
Everything runs locally in your browser — no data is sent to any server. Here is exactly how it works:
- Paste your JSON into the left textarea
- The XML tree builds automatically as you type
- Switch indentation between two and four spaces if you prefer another style
- Copy the XML output with one click
Frequently Asked Questions
Objects, arrays, strings, numbers, booleans and null. A JSON document must have a single root, so a top-level array is wrapped in an <items> element and bare scalars are wrapped in a <root> element.
Each key becomes an XML element name. Characters that are illegal in XML names (spaces, leading digits, punctuation) are replaced with underscores, and array items become <item> elements.
A null is emitted as a self-closing empty element, the closest XML equivalent since XML has no built-in null. Converting back with an XML to JSON tool maps empty elements to empty strings.
Yes — pick two or four spaces per level. The indent choice affects readability only; the parsed XML content is identical either way.