How to convert JSON to XML
- Paste your JSON.
- Set the root element name if the JSON has no single outer key.
- Copy the XML or download it.
About this tool
Paste JSON and get XML you can use in feeds, SOAP calls and older systems. Write a key as @_id to make an attribute, and use #text for the text next to attributes. Lists become repeated elements, and characters like & and < are escaped for you.
Common questions
How do I write an attribute?
Start the key with @_. For example, "@_id": "7" on a book object gives <book id="7">.
What if my key is not a valid XML name?
XML names must start with a letter or underscore. The page tells you which key is a problem instead of writing broken XML.
Why was a root element added?
XML needs exactly one outer element. If the JSON has several top-level keys or is a list, it is wrapped in the root name you choose.
Is it free to use?
Yes. There's no sign-up, and you can use it as often as you like.
Is my text uploaded anywhere?
No. This tool runs inside your browser, so what you enter stays on your device.
Do I need to install anything?
No. It works in your browser on a computer or a phone.