Skip to main content
Free File Converter

JSON to XML converter

Wrap a JSON document in XML elements under a root element you choose.

Processed in your browser. This file is converted on your device and is never uploaded.

Converter

Input

.json up to 25 MB. You can also drag a file here.

Options
JSON has no document element, so every output is wrapped in this one.

No file selected.

About this tool

Enterprise systems, SOAP services, RSS feeds, and many older integrations still speak XML. This tool converts a JSON document into indented XML so it can be handed to one of them.

JSON has no document element, so you choose the name of the root element that wraps the output.

Supported formats and limits

Input
.json
Output
.xml (application/xml)
Output name
The original name with the new extension, for example data.json becomes data.xml.
File size limit
25 MB
Processing
In your browser. The file is not uploaded.

How to use it

  1. Choose a .json file, or switch to Paste text and paste the JSON directly.
  2. Enter a name for the root element.
  3. Select Convert, then download the .xml file.

Limitations

  • The mapping is not reversible on its own. XML distinguishes elements, attributes, and text nodes; JSON does not, so the structure has to be guessed when converting back.
  • Object keys become element names, so a key that is not a valid XML name, such as one starting with a digit or containing a space, produces XML that will not parse.
  • Arrays become repeated sibling elements. An empty array produces nothing at all, so the fact that the field existed is lost.
  • There is no schema, namespace, or DTD in the output.
  • Types are lost. Every value becomes element text.

Frequently asked questions

Is my file uploaded?
No. The conversion runs entirely in your browser. The file never leaves your device and no request carrying its contents is made.
Why must I name a root element?
An XML document must have exactly one outermost element. A JSON array or a plain value has no name of its own, so one has to be supplied.
Can I produce attributes instead of elements?
Yes, indirectly. A key beginning with @ is written as an attribute, which matches the convention the XML to JSON tool uses when reading attributes back.
Is the output valid XML?
It is well formed as long as your JSON keys are valid XML element names. Special characters in values are escaped for you.