JSON to XML Converter
Paste JSON to get well formed XML instantly. Object keys become elements, arrays become repeated tags, and special characters are escaped. Your data stays in your browser.
How to convert JSON to XML
- Paste or type your JSON into the input box.
- Set the root element name and indent to match your needs.
- Copy the XML or download it as an .xml file.
Examples
Object to nested elements
{"name":"Ada","age":36}<?xml version="1.0" encoding="UTF-8"?> <root> <name>Ada</name> <age>36</age> </root>
Frequently asked questions
Is my data uploaded anywhere?
No. The conversion runs entirely in your browser, so your JSON never leaves your device.
How are JSON arrays turned into XML?
Each array item becomes a repeated element that reuses the key name. A top level array uses <item> elements because it has no key.
Are special characters escaped?
Yes. The characters &, <, > and " are escaped to their XML entities, so the output stays valid.
What happens to keys that are not valid XML names?
Spaces and other invalid characters become underscores, and a name that starts with a digit is prefixed with an underscore.
Can I change the root element or remove the indentation?
Yes. Set any root name you like, and choose two spaces, four spaces, a tab or compact output with no indentation.
How are null values represented?
A null becomes an empty element, for example <note></note>, which keeps the structure intact.
Related tools
JSON to CSV
Convert JSON to CSV online. Paste an array of objects and get clean, spreadsheet-ready CSV with the right headers. Runs in your browser.
JSON to YAML
Convert JSON to YAML online. Paste JSON and get clean, readable YAML with proper 2-space indentation. Fast, free and runs in your browser.
JSON Formatter
Format, validate and minify JSON online. Pretty-print with custom indentation, sort keys and catch syntax errors. Runs in your browser.
Binary to Decimal
Convert binary to decimal online. Paste any binary number, with or without spaces, and get the exact base-10 value instantly. Runs in your browser.
Binary to Hex
Convert binary to hexadecimal online. Paste a binary number and get exact hex, with optional uppercase. Handles huge values. Runs in your browser.
Celsius to Fahrenheit
Convert Celsius to Fahrenheit instantly. Type a temperature in C and get F, with the formula and a quick reference table. Runs in your browser.