Convert JSON to XML
Convert JSON to XML in your browser: load your JSON, choose XML as the target, and download the result. The converter reports exactly what it could not carry across, and nothing is uploaded to a server.
Convert JSON to XMLRuns in your browser. Nothing uploaded.
When you need this
Older enterprise systems, SOAP endpoints, banking interfaces and a great many government APIs still require XML. If you are integrating with one, this is the shape it wants, and the mismatch you have to resolve is that JSON has arrays and XML does not.
How to convert JSON to XML
- Load your JSON
- Drag the .json file in, paste the text, or open it straight from a URL — an API response usually arrives as a paste. Nothing leaves your browser at this or any later step.
- Choose the target format
- Press Ctrl+Shift+K (Cmd+Shift+K on a Mac) to open the conversion panel, then pick XML as the target. The source and the result sit side by side.
- Read the loss report
- The panel shows whether the conversion is lossless for your particular data, and lists every value it had to transform. Adjust indentation, key sorting and null handling if you need to.
- Take the XML
- Download the .xml file, copy it, or open it as a new tab to keep working on it in the XML views.
What survives the conversion
JSON to XML cannot be lossless, because the two formats express different things. XML needs a single root element, and has no native array — repeated elements are an approximation.
- XML requires exactly one root element. An array at the root is wrapped in a generated element, and the wrapper name appears in the warnings so you can match it to what the receiving schema expects.
- XML has no array type. Repeated sibling elements are the closest equivalent, which means a one-element array and a plain value produce identical XML and are indistinguishable on the way back.
- Keys that are not valid XML names — starting with a digit, or containing a space — are rewritten, because an element cannot be named
2024 total.
A worked example
An array becoming repeated elements under a generated root:
{ "tags": ["red", "blue"] }<root>
<tags>red</tags>
<tags>blue</tags>
</root>Privacy
The conversion runs in your browser — in a Web Worker for anything above a quarter of a megabyte, so the page stays responsive. Your data is not uploaded, not logged and not stored. There is no account, and the whole thing works offline.
Questions
How is a JSON array represented in XML?
As repeated sibling elements sharing one name, which is the conventional mapping and the only one XML allows. The consequence is worth stating plainly: {"tags": ["red"]} and {"tags": "red"} produce the same XML, so a round trip cannot tell you which one you started with.
Is converting JSON to XML lossless?
No, and no tool can make it so. XML needs a single root element, and has no native array — repeated elements are an approximation. The converter lists every affected value rather than silently dropping it.
Is my JSON uploaded to a server?
No. The file is read and converted by your browser. Nothing about its contents is sent anywhere, which you can verify in your browser’s network panel or by using the tool with the network disconnected.