JSON to XML

Convert JSON to well-formed, indented XML with a root element you choose.

Convert JSON to well-formed XML

Many systems still speak XML: SOAP services, publishing workflows, government and financial interfaces, older import formats. JSON to XML converts a JSON document into indented, well-formed XML with a declaration, ready for those systems or for a stylesheet.

Paste the JSON or drop a .json file and, if you like, name the root element. Each object key becomes an element; arrays become repeated elements with the same name; nested objects become nested elements. Two conventions let you control the output precisely: a key that starts with @ becomes an attribute of its parent element, and a key named #text becomes the element's text content, which is exactly how XML to JSON writes attributes and mixed content, so a round trip preserves them. Names that are not legal in XML, such as ones starting with a digit or containing spaces, are made legal. Booleans are written as true and false, null as an empty element. If the JSON is an object with a single key holding an object or a list, that key becomes the root element.

Special characters are escaped correctly and the file is UTF-8. Invalid JSON is reported with its line and column. To go the other way use XML to JSON, and to inspect a large result use the JSON Formatter or Compare JSON.

How to use the JSON to XML tool

  1. Type or paste your JSON, or open a file.
  2. Set your options: Root element name.
  3. Click “Process JSON to XML” and download your result.

Common questions

Is JSON to XML free?

Yes. JSON to XML is free for light use with no signup needed. Anonymous visitors get 10 free tasks per day, and creating a free account makes daily use unlimited. A paid Pro plan removes ads and raises file-size limits for heavier work.

Is my file safe?

Yes. Your file is sent over HTTPS, processed by self-hosted open-source software on our servers (no third-party AI or cloud APIs), and deleted within 60 minutes at the latest, usually right after your result is ready.

What file formats does JSON to XML accept?

JSON to XML accepts JSON files. Convert other formats to a supported one first; the related tools below can usually do it.

Related tools

Browse all 110+ free PDF, image, Markdown and JSON tools →