en

JSON to XML

Convert a JSON file to XML locally - with elements and attributes, no upload, right in your browser. No daily cap.

Running locally on your device ...

Running locally on your device ...

0%

Is my file uploaded?

No. Everything runs in your browser - your file never leaves your device. How this is verifiable

No upload100% local
Your content stays with youno third-party access
Hosted in GermanyGlobal Content Delivery
Independently auditedTLS A+ · HTTP headers A+

JSON is the language of modern APIs and web apps, yet many enterprise systems, SOAP services, RSS/Atom feeds, Office and configuration formats still require XML. This tool serialises your JSON tree into equivalent, well-formed XML.

The conversion runs entirely locally in your browser (fast-xml-parser, pure JavaScript). Object keys become elements; keys prefixed "@_" become XML attributes - exactly mirroring XML-to-JSON, so a round-trip is preserved. Because XML needs exactly one root element, a top-level array or an object with several top-level keys is wrapped in a <root> element; there, its entries become repeated <item> elements (as the value of a named key, an array instead becomes several elements with that name). A single top-level key whose value is an array is wrapped in <root> as well.

You will meet this when exporting to a legacy system, an XML-only import, a SOAP endpoint or an Office template. The result is indented, well-formed XML with an XML declaration - ready to open or feed into an XML toolchain. Invalid JSON is rejected with a clear error, and nothing is uploaded.

One structural difference shapes the result: XML requires exactly one root element. A JSON array at the root therefore gains an enclosing node, and array items of the same name become repeated elements of that name - precisely the shape XML processors and XSD schemas expect.

No file-count or daily limits, no account, no paywall, no watermark. Only your device limits the size - up to 2 GB per run. Many online services limit free use to a few runs per day or require an account; here everything runs locally in your browser - with no daily quota and no sign-up.

Specifications

Specifications
Input formatsJSON
Auto-conversionXLSX, SQLite
Output formatXML
Batch processingNo
ProcessingLocally in your browser (JavaScript)
File uploadNone

In 3 steps

  1. Drop or pick your JSON file.
  2. The tool serialises it to XML.
  3. Download the XML file.

Limitations: The result is always well-formed XML with exactly one root element. A single top-level key becomes the root directly, as long as its value is not an array; arrays, or objects with several top-level keys, are instead wrapped in <root>, whose entries become <item> elements there (as the value of a named key, an array instead becomes several elements with that name). Keys prefixed "@_" become attributes - JSON has no native attribute concept, so without that prefix everything becomes elements. Keys that are not valid XML element names are sanitised deterministically (an invalid character becomes _, a leading digit gets a _ prefix, an empty name becomes _); the original name is kept in a name="..." attribute, and name collisions created by this sanitising are reported as a hint. JSON numbers and booleans are written into the XML as plain text, since XML itself has no data types. Control characters not allowed in XML 1.0 are replaced with the Unicode replacement character (U+FFFD) and reported as a hint. Invalid JSON is rejected with a clear error. Lists placed directly inside a list (such as [[1, 2]]) become one <item> element per inner list; converting back to JSON returns them as an object with an item list rather than as a nested list. Attribute names after "@_" are sanitised by the same rule as element names; an attribute whose value is an object or a list, or whose sanitised name collides with another attribute, becomes a child element instead, with the original key kept in name="...". Emoji are not allowed in XML names, so in keys they are replaced with _ characters as well (original in name="..."); in values they stay unchanged. U+FFFE, U+FFFF and lone surrogate characters are also replaced with U+FFFD. Data that would nest deeper than 100 element levels is rejected with the json-to-xml_too_deep error.

FAQ

Is my file uploaded?

No. The conversion runs entirely locally in the browser - nothing is sent.

How are XML attributes produced?

Keys prefixed "@_" become attributes - exactly mirroring XML to JSON.

Why a <root> element?

XML needs exactly one root. Arrays and objects with several top-level keys are therefore wrapped in <root>.

What happens to JSON arrays?

Array entries become repeated <item> elements.

Is a round-trip possible?

Yes, the "@_" attribute convention matches our XML to JSON tool.

Is JSON to XML free - are there any limits?

Yes. You can use JSON to XML as often as you like: no daily cap, no account, no paywall, no watermark. All selected files together may be at most 2 GB per run; on devices with little memory this bound is lower, because it follows your device's memory.

Related tools

XML to JSON · JSON to YAML · CSV to JSON · Avro to JSON · YAML to XML · TOML to JSON