JSON to XML Converter
Free JSON to XML converter — and XML to JSON too. Convert between JSON and XML instantly in your browser, with attributes, arrays and nested data handled cleanly.
🔒 Conversion runs entirely in your browser — nothing is uploaded. Tip: press Ctrl+Enter to convert.
Free JSON to XML Converter (and XML to JSON)
This free online JSON to XML converter instantly turns JSON into clean, indented XML — and converts XML back to JSON too, with one click. Paste your data, choose a direction, and copy the result. It handles nested objects, arrays, attributes and text nodes, and runs 100% in your browser, so your data is never uploaded anywhere.
How to convert JSON to XML
- Choose a direction — JSON → XML or XML → JSON.
- Paste your data on the left (or click Load sample to try it).
- Click Convert. The result appears on the right, syntax-highlighted.
- For JSON → XML, set the Root element name and toggle the XML declaration; for either direction, pick your indent.
- Use Swap to flip the result back into the input, then Copy or Download the file.
How JSON maps to XML
JSON and XML both describe structured data, but in different shapes. This converter uses a clear, predictable
mapping: each JSON object key becomes an XML element, arrays repeat the element once per item, and primitive
values become the element’s text. Keys that start with @ become XML attributes,
and a special #text key becomes an element’s text content — the same structure produced
when you convert XML back to JSON, so round-trips stay consistent.
JSON is compact and ideal for JavaScript and APIs, while XML is common in configuration files, RSS/Atom feeds, SOAP services, sitemaps and older enterprise systems. Converting between them lets you move data between modern apps and these XML-based tools without rewriting it by hand.
Frequently asked questions
Is this JSON to XML converter free and private?
Can it convert XML back to JSON?
@name keys), repeated tags (as arrays) and text content (as
#text) and produces a matching JSON object.How are XML attributes handled?
@ (for example @id). When converting JSON to XML, any key starting with
@ is written back out as an attribute, and a #text key becomes the element’s
text — so you can round-trip data cleanly.What happens to JSON arrays?
{"skill":["JS","PHP"]} becomes <skill>JS</skill><skill>PHP</skill>.
Converting that XML back to JSON restores the array.