Generate well-formed XML from JSON data. Free in your browser — no sign-up, no watermarks.
How to convert JSON to XML
- Click Choose files (or drag & drop) and select one or more JSON files. You can also paste the input text directly into the box below the uploader.
- Review the options (delimiter is auto-detected for CSV) — usually the defaults are exactly right.
- Press Convert to XML. Each file is converted with a live progress indicator.
- Open the download page to save your files individually or grab everything as a single ZIP.
Why convert JSON to XML?
When an older integration, SOAP service or e-invoicing system demands XML, this tool serializes your JSON into clean, indented, well-formed markup. Keys starting with @ become attributes, arrays become repeated elements — the mirror image of our XML to JSON mapping.
Advertisement
What this tool preserves — and what it changes
✓ Preserved
- The '@' and '#text' conventions: '@'-prefixed keys become attributes and '#text' becomes element text — the mirror image of our XML to JSON mapping
- Arrays, which come out as repeated elements with the same tag name
- Escaping everywhere: every value and attribute is XML-escaped (& < > " '), so your data can never break the markup
↺ Changed
- A top-level object with exactly one key becomes the root element — unless that key holds an array; then, like every other shape, the output is wrapped in a <root> element
- An XML declaration (UTF-8) and 2-space indentation are added
- null and empty strings produce empty elements, and empty objects self-close (<tag/>)
- Numbers and booleans become plain element text — XML carries no type information
Known limits & edge cases
- Keys are sanitized into legal XML names — illegal characters become underscores and names starting with a digit get one prefixed — so unusual keys may not round-trip exactly
- A top-level JSON array becomes one <root> element per item, so two or more items yield multiple root elements — strict parsers reject that; wrap the array in an object first if you need a single-rooted document
- JSON that does not parse stops the conversion before any XML is emitted, surfacing the JSON parser's own error text
Engine: In-browser JavaScript converters with no external libraries (XML parsing uses the browser's built-in DOMParser). These statements describe the engine as shipped on 2026-10-02 — behaviour changes are recorded in the changelog.
About the formats
JSON vs XML at a glance
| JSON | XML |
| Type | Structured data | Structured data |
| Compression | Text | Text |
| Typical use | APIs, configuration, data exchange | Enterprise data, feeds, invoices |
Meeting XML-only systems halfway
Your data is JSON; the receiving system was specified in 2006. Procurement platforms, SOAP endpoints, publishing toolchains and government submission portals still require XML, and this converter produces it from your JSON: keys become elements, arrays become repeated elements, nesting becomes hierarchy — well-formed and indented for both machines and the humans who will inevitably inspect it.
The practical detail: “valid XML” usually means “valid against their schema,” and schemas care about element order, naming and structure. Shape your JSON to mirror the expected document — matching key names, arrays where the schema repeats elements — and the output drops in cleanly; one glance at the target’s sample XML before converting beats three rounds of rejection emails after.
Frequently asked questions
Is this JSON to XML converter free?
Yes — completely free, with no sign-up, no watermarks and no daily quota. Processing happens in this browser, so the practical limit is the memory available on your device.
Can I convert multiple JSON files at once?
Yes. Select or drop as many files as you like — each one is converted in sequence with its own progress status, and you can download the results individually or all together as a ZIP archive.
Advertisement