← Back to File & Data Tools
Checking tool availability…
JSON to XML processes files locally in your browser.
Convert JSON to XML online
Turn JSON data into a formatted, standards-compliant XML document without installing desktop software. Upload a .json file or paste JSON directly, choose a root element name, and review a live preview before downloading the .xml file.
Your JSON is processed locally in your browser and is not uploaded to our servers.
How to convert JSON to XML
- Choose or drag a .json file into the tool, or switch to Paste JSON and paste your text.
- Review the sanitized root element name and the generated XML preview.
- Optionally change the root element name — invalid characters are rewritten automatically and the final name is shown before you convert.
- Select Convert to XML to generate and download the .xml file.
Predictable, standards-compliant conversion
- Every JSON array becomes repeated <item> child elements, applied consistently at every nesting level.
- Object keys that are not valid XML names are rewritten, and the original key is preserved in an original-key attribute.
- JSON null becomes a self-closing element with xsi:nil="true".
- Large integers, decimals, and scientific notation are copied through exactly using the original source text.
- The generated XML is validated before download, and the file is never left malformed.
Private JSON-to-XML processing
Your JSON is processed locally in your browser and is not uploaded to our servers, whether you choose a file or paste text. Parsing and XML generation both run in the browser with a custom JSON parser and XML serializer. There is no Looty Tools conversion endpoint that receives your JSON contents for this workflow.
Limits and important notes
- Maximum JSON size is 25.0 MB, whether uploaded or pasted.
- Maximum nesting depth is 100 levels.
- Maximum output is 250,000 generated XML elements and 50.0 MB of XML. Exceeding a limit fails with a clear error rather than producing truncated or malformed output.
- Only one JSON input can be converted at a time.
- Empty objects, empty arrays, and empty strings all produce the same empty XML element; the original JSON type is not preserved for empty values.
- Comments, trailing commas, and other non-standard JSON extensions are rejected rather than tolerated.
Related tools
JSON to XML FAQ
- How do I convert JSON to XML?
- Open JSON to XML, choose or drop a .json file (or switch to Paste JSON and paste your text), review the sanitized root element name and generated XML preview, then select Convert to XML to download an .xml file.
- Is my JSON uploaded to Looty Tools?
- No. Your JSON is processed locally in your browser and is not uploaded to our servers, whether you choose a file or paste text.
- How are JSON arrays represented in the XML?
- Every array becomes an element containing one <item> child per entry, in the original order. This is applied consistently at every nesting level, including a top-level array, so array structure is always predictable.
- What happens to JSON keys that are not valid XML element names?
- Keys with spaces, punctuation, a leading digit, or the reserved "xml" prefix are rewritten into a valid element name (for example "first name" becomes first_name). Whenever a name is changed, the original key is preserved in an original-key attribute so no information is lost.
- How is JSON null represented?
- A null value becomes a self-closing element with xsi:nil="true", using the standard XML Schema Instance namespace. The namespace is declared once on the root element only when at least one null value is present.
- Are large numbers and decimals preserved exactly?
- Yes. The tool uses a custom JSON parser rather than JSON.parse, so integers larger than Number.MAX_SAFE_INTEGER, decimals, and scientific notation are copied into the XML using their exact original text instead of being reformatted.
- What are the size and structure limits?
- Each JSON file or pasted input must be 25 MB or smaller. Conversions are limited to 100 levels of nesting, 250,000 generated XML elements, and 50 MB of output XML.
- Can I choose the root element name?
- Yes. Enter any name and the tool sanitizes it into a valid XML element name, showing you the final name that will be used before you convert. Leaving it blank uses "root".