JSON to XML
Paste JSON, get well-formed XML with the root and item names you choose.
Works in your browser. Nothing you paste is sent to us.
Options
Converted in your browser. Nothing you paste is sent anywhere.
JSON to XML at a glance
- Price
- Free
- Data sent to us
- None, it runs in your browser
- Sign-up
- Not needed
- Formats
- JSON, YAML, XML, any direction
- Options
- Indent, sort keys, XML root and item names
- Size
- Files up to 20 MB
How to use JSON to XML
- Choose the formatsPick From and To at the top, or leave them and let the tool read what you paste as what it looks like.
- Paste or open the filePaste into the left box, or press Open a file or drop one on the box. The result appears on the right as you type.
- Copy or downloadSet the indent or XML names under Options if you need to, then press Copy or Download.
Paste JSON and read it as XML: keys become elements, keys starting with @ become attributes, #text becomes element text and arrays become repeated elements with the key's name. JSON with several top-level keys or a top-level list is wrapped in a root element you can name, and list items at the top level take the item name you set. Names that are not valid in XML are made valid. Nothing is sent anywhere.
How it works
JSON to XML is a web page that does its work on your own device. The file you choose is opened by your browser, changed there and saved from there; it is never sent to a server, so there is no copy of it anywhere to delete, no queue and no waiting for an upload. Most online tools of this kind send your file to their servers and work on it there, and many keep it for a while. This one does not. There is no account, no watermark and no limit on how often you use it, and the result downloads the moment it is ready.
Making attributes
Rename a key to start with @, such as "@id": 42, and it becomes an attribute of its parent element rather than a child element. Only simple values can be attributes; objects and lists stay as elements.
Questions
Is the output valid XML?
Yes: one root element, escaped text, and element names cleaned of characters XML does not allow, with an XML declaration at the top. It is not validated against a schema.
Other shortcuts
JSON, YAML and XML Converter · YAML to JSON · JSON to YAML · XML to JSON


