What this tool does
JSON → XML maps object keys to element names, array values to repeating elements, and the top-level array uses item subelements. null is output as an empty element, and strings, numbers, and booleans are output as safely escaped text.
- The default root element is named root.
- The object key and root element must be legal XML names; if they are not legal, an error will be explicitly reported.
- Characters such as &, <, >, quotation marks, etc. will not be executed as labels.
How to use it
- Paste the valid JSON.
- Confirm or modify the root element name.
- Click "Convert to XML".
- Copy or download result.xml after checking the array and null values.
Common uses
- Prepare simple data for systems that only receive XML.
- Generate an XML skeleton for a configuration or test fixture.
- Check how the JSON hierarchy maps to repeating elements.
JSON → XML Features
Recursively convert objects and arrays, safely escape text and reject illegal XML tag names. It is suitable for daily development, debugging, data sorting and code optimization scenarios. The processing results can be directly viewed, copied or downloaded.
FAQ
What labels will be used for the array?
Arrays in object properties repeat the property name; the top-level array is placed under the root element and uses item.
How to convert null?
null is converted to an empty element, such as <value/>, the rules are fixed and the string "null" will not be output.
Why do some JSON keys report errors?
Keys starting with spaces, numbers, or containing disallowed characters cannot directly become XML tags; the tool chooses to clearly report errors to avoid silently generating illegal XML.