How to use the JSON to XML Converter
Fill in the fields above and the result appears straight away. Everything runs in your browser, so nothing you type is uploaded.
Read more: How to Use the JSON to XML Converter: Steps and a Worked Example
Examples
- With the default values
<?xml version="1.0" encoding="UTF-8"?> <root> <book id="bk101"> <title>XML Basics</title>
Limitations and assumptions
Keys that are not valid XML names are made valid (spaces and symbols become _, a leading digit gets _). Nothing is uploaded; the conversion runs in your browser.
Frequently asked questions
How are JSON arrays converted to XML?
Each item becomes its own element with the array's key as the name, so "author": ["Ann", "Raj"] gives 2 <author> elements. A top-level array is wrapped in <item> elements.
How do I make an XML attribute?
Start the key with @. {"book": {"@id": "bk101"}} becomes <book id="bk101"/>. Use "#text" for the text inside an element that also has attributes.
Why does my key get an underscore?
XML names cannot contain spaces or most symbols and cannot start with a digit, so those characters become _ and a leading digit gets a _ in front.