What this tool does
This builder turns a JSON object into XML: keys become tags, nesting becomes parent-child structure, and special characters are escaped automatically. When a legacy system only accepts XML, when you need the skeleton of a sitemap or RSS feed, or when a tool insists on an XML config, this replaces hand-writing templates.
It shares its conventions with the XML to JSON tool on this site: attributes parsed from XML come back as keys with the @_ prefix, and here a key with the @_ prefix becomes an attribute again — so data round-trips between the two without losing information.
How to use
- Step 1: paste JSON Paste the whole JSON document. Syntax errors are reported with line and column, so you never receive a half-built XML that hides where the input broke.
- Step 2: name the root XML requires exactly one root element, and the JSON top level is wrapped in it — root by default, configurable to anything valid such as config or items.
- Step 3: generate and copy Pretty indentation is on by default for readability; turning it off yields a single compact line suited to API responses. Special characters are always escaped, so any XML parser can read the output.
Limits
No DTD, XSD or namespace declarations; no CDATA option (text is always escaped); and invalid tag names are sanitised rather than rejected — so design your JSON keys with tag names in mind. A single file is capped at 10MB with a clear error beyond that.
FAQ
Why was my key renamed?
XML tag names cannot contain spaces or start with a digit: my key becomes my_key and 1st becomes _1st. Put such values in attributes or content instead of using them as keys.
How do I generate attributes?
Prefix the key with @_: {"@_id": "7"} becomes <item id="7">. This mirrors the XML to JSON tool, so round trips are consistent.
What happens to a top-level array?
XML needs a single root, so arrays are wrapped in <item> entries under the root. If you want a different tag name, shape the JSON as an object with an array (for example {"row": [...]}).
Can I use Chinese tag names?
XML 1.0 does allow some non-ASCII names, but compatibility varies. This tool replaces anything outside [A-Za-z0-9_.-] with underscores so every parser can read the output.
Can it produce CDATA sections?
No. Text is always escaped (< becomes <), which behaves identically everywhere and avoids the classic ]]> corruption. Adjust to CDATA by hand after converting if you need it.
Is my JSON uploaded?
No. Generation happens in the page and no request carries your data, so internal API shapes and secret-shaped keys never leave the device.