JSON to XML

Paste JSON and it converts to XML automatically — nothing leaves your browser.

JSON Input 0 lines
1
XML Output 0 lines
1
UTF-8 · 0 B JSON → XML
Waiting for input

How It Maps

  • @name keys become attributes
  • Arrays become repeated elements
  • #text becomes element text
  • Instant conversion as you paste
  • Copy or download the result

Features & Supported Capabilities

  • Detects and reports invalid JSON before converting
  • Escapes special XML characters automatically
  • Handles files up to 10 MB
  • Optional line wrapping for long output
  • Runs entirely in your browser — nothing uploaded

About this JSON to XML converter

Some systems still expect XML: SOAP endpoints, enterprise integrations and older import tools. This free online JSON to XML converter turns a JSON document into well-formed XML, with keys becoming elements, arrays becoming repeated elements and values becoming text, ready to send or to feed into further processing.

It works entirely in your browser, so your data is not uploaded. To go the other way use XML to JSON. To make the output easy to read open it in the XML formatter, or validate your input first with the JSON formatter.

Frequently Asked Questions

Everything you might want to know about the online JSON to XML converter.

Each JSON key becomes an XML element name, and nested objects become nested elements. If your JSON has a single top-level key, that key is used as the XML root; otherwise everything is wrapped in a <root> element.
Prefix a key with @, e.g. "@id": "1" becomes the attribute id="1" on that element. A "#text" key becomes the element's own text content.
A JSON array under a key produces one XML element per array item, each using that same key as its tag name — so "book": [...] with three items becomes three sibling <book> elements.
No. The conversion runs entirely in your browser. Your JSON is never uploaded, stored, or logged.
Yes, use the XML to JSON tool, which follows the same @attr / array / #text conventions in reverse.
You can paste text or upload a file up to 10 MB.
A null value produces an empty self-closing element, e.g. <middleName/>, so the key is still present in the output.
Yes. Use the Copy button to copy it to your clipboard, or Download to save it as a .xml file.
Yes. The JSON is parsed first, so a syntax error is reported with a line and column instead of producing incorrect XML.