Advertisement
JSON to XML Converter
Convert JSON objects and arrays into well-formed XML markup. Free, instant, and no signup required.
→
Input (JSON)
Output (XML)
About JSON to XML conversion
JSON is the default data-interchange format for REST APIs, config files, and NoSQL databases — nested objects and arrays, but no comments. XML is the format behind SOAP APIs, RSS/Atom feeds, Office file formats, and older enterprise data exchange — it supports attributes, mixed content, and namespaces that JSON has no equivalent for.
Object keys become element names, repeated keys become sibling elements, and any key prefixed with @ becomes an XML attribute ("@id": "42" → <item id="42">). A #text key carries mixed text content alongside attributes or child elements.
How to convert JSON to XML
- Paste your JSON into the left editor, or click sample above it to try example data.
- Click Convert. The XML result appears on the right instantly.
- Click copy to copy the result, or download to save it as a file.
Example
Input (JSON):
{
"name": "Ada Lovelace",
"role": "Mathematician",
"active": true,
"skills": ["math", "programming"]
}
Output (XML):
<?xml version="1.0" encoding="UTF-8"?>
<root>
<name>Ada Lovelace</name>
<role>Mathematician</role>
<active>true</active>
<skills>math</skills>
<skills>programming</skills>
</root>
Frequently asked questions
What happens to JSON keys that aren't valid XML tag names?
Any character that isn't a letter, digit, underscore, period, or hyphen is replaced with an underscore, and a leading underscore is added if the name would otherwise start with a digit or symbol, since XML tag names can't start with those.
Do I need to create an account?
No. There's no signup, login, or account required — paste your data and click Convert.
Is there a file size limit?
There's no hard-coded limit, but very large inputs (multi-megabyte files) can slow down or briefly freeze the tab while converting. For big files, converting in smaller chunks works better.
Why did my conversion fail?
Check the status line under the Convert button — it reports the exact line and column where the parser stopped, and the input editor highlights that line in red so you can jump straight to it.