Nifty Tools

JSON to XML

Convert json to xml in your browser. Paste JSON and download well-formed XML 1.0 with sanitized element names. No upload, no signup, no watermark.

Processing mode: Local Browser-local

Waiting for JSON.

How to use it

JSON to XML Converter — Free, In Your Browser

  1. Paste JSON into the editor. Up to ~10 MB of pasted text per run.
  2. Click Convert and the emitter walks the parsed value, wrapping it in a single `<root>` element and recursing into each key.
  3. Copy the XML to the clipboard or download it as a `.xml` file. Nothing leaves your browser.

Good for

Common use cases

People convert JSON to XML when the receiving system was built before JSON became the default and still speaks XML at its boundary. SOAP web services, SAML identity-provider metadata, RSS and Atom feed publishers, RETS and MLS real-estate APIs, GPX route files, the export formats for older banking and accounting systems (Sage 50, QuickBooks Desktop, several UK Making Tax Digital bridge providers), enterprise integration buses (MuleSoft, BizTalk, IBM Integration Bus), Office Open XML internals, and most government XML schemas (UK HMRC submissions, US FedRAMP attestations) all expect XML 1.0 in their inbound channel. The translation from a JSON-native modern API into the XML the legacy system expects is mechanical but error-prone — a single invalid element name (anything starting with a digit, containing a space, or matching the reserved `xml*` prefix) will be rejected by a strict XML parser. Doing the conversion in the browser (no upload, no signup, no watermark) emits well-formed XML 1.0 with element-name sanitisation, predictable ampersand/lt/gt escaping, and a single `<root>` wrapper so the output is paste-ready into any XML-consuming endpoint. Browser-local conversion also keeps internal API responses, identity payloads, and unreleased data structures off third-party servers.

Processing mode

Browser-local

Files are processed by your browser. They never reach our servers.

Questions

JSON to XML Converter — Free, In Your Browser FAQ

How are JSON keys turned into XML element names?

XML 1.0 element names must start with a letter or underscore and may contain only letters, digits, hyphens, dots, and underscores. The converter restricts NameStartChar further to ASCII letters and underscore for portability — every conformant XML parser handles those without ambiguity around Unicode normalisation. Any character outside that set is replaced with underscore, including the leading character if it's invalid (so a JSON key called `"123abc"` becomes `<_23abc>` in the XML). XML 1.0 also reserves names beginning with `xml` (in any case combination) for standardisation use, so a JSON key like `"xmlns"` or `"XmlThing"` is prefixed with an underscore (`<_xmlns>`, `<_XmlThing>`) so the output passes strict-conformance validators. If your downstream consumer needs the original key as data rather than as an element tag, restructure the JSON to put the original key in an attribute or text value before paste.

How are JSON arrays represented in the XML?

Arrays under a key render as repeating sibling elements that reuse the parent key. The JSON `{"items": ["a", "b"]}` becomes `<root><items>a</items><items>b</items></root>` — the canonical "array under a key" shape every XML feed format (RSS items, Atom entries, GPX trkpt) already uses. The converter does not synthesise an inner `<item>` wrapper inside an array-under-a-key, because every legacy XML schema disagrees on what that wrapper should be called and inventing one tends to break ingestion. The one exception is a top-level JSON array — there is no parent key to reuse, and XML 1.0 requires a single document element, so the converter wraps the array once in `<root>` and emits each entry as a neutral `<item>` child (`["a", "b"]` becomes `<root><item>a</item><item>b</item></root>`). If you need a different wrapper or child name, restructure the source JSON before paste.

Are characters escaped correctly for use in a SOAP envelope or feed?

Yes. The five XML predefined entities are emitted: `&` becomes `&amp;`, `<` becomes `&lt;`, `>` becomes `&gt;`, `"` becomes `&quot;`, and `'` becomes `&apos;`. Numbers are emitted as their string form, booleans as `true`/`false`, and `null` becomes a self-closing element (`<key/>`). The output starts with the standard XML declaration `<?xml version="1.0" encoding="UTF-8"?>` so character-set autodetection works in every XML parser.

Why is everything wrapped in a single `<root>` element?

XML 1.0 requires a single document element — multiple top-level siblings are not well-formed XML and any conformant parser will reject them. JSON has no such requirement, so a top-level JSON array would otherwise produce multiple sibling elements with no parent. Wrapping in `<root>` is the smallest, safest convention that keeps the output well-formed regardless of the input shape. If your downstream schema expects a different document element name, search-and-replace `<root>`/`</root>` after copy — the rest of the document is unchanged.

Is there a file size limit for the JSON paste?

Each paste stays under roughly 10 MB. The emitter materialises the full XML string in memory before handing it back, so very large payloads can stall on lower-RAM devices. For everyday API translation, SAML metadata, and feed-builder work this is comfortable. For multi-gigabyte data warehouse exports, server-side `xq` or a streaming XML emitter is the right tool — this converter is built for the everyday "drop a JSON response into a legacy endpoint" case.

Will this tool stay free?

The basic workflow is designed to stay free. Paid upgrades later will focus on bigger limits, batch work, OCR, saved presets, and ad-free use.