MergeJSON

JSON to XML Converter.

Convert JSON to clean XML in one click — control attributes vs elements, name the root and array items, and pretty-print or minify. All private, in your browser.

No signup · No uploads · No public sharing

XML output

// Paste input and press “Convert to XML”.

Convert JSON to XML online — free and private

A JSON to XML converter rewrites JSON data as XML markup for enterprise systems, SOAP APIs, RSS, and legacy integrations. Paste your JSON above, press Convert to XML, and the tool produces well-formed, indented XML. Because it runs client-side, you can convert JSON to XML online without ever uploading or publicly sharing your data.

How to convert JSON to XML in three steps

  1. Paste your JSON into the input, or click “Load sample”.
  2. Choose your options — root name, array-item name, indent, and whether to include the XML declaration.
  3. Convert and export — copy the XML or download it as data.xml.

Attributes, elements, and text content

Good XML uses attributes as well as elements, so this converter maps any key beginning with @ to an attribute and a #text key to the element's text content. That gives you real control over the shape of the output instead of forcing every value into a child element. You also set the root element name and the element name used for array items.

Why use this JSON to XML tool?

Some popular converters default to making your data public through a shared link — a privacy risk. This one is 100% local, with pretty or minified output and no file-size cap. Need the reverse? Use the XML to JSON converter, or explore other formats like JSON to YAML and JSON to CSV. Learn more in our guide on how to convert JSON to XML.

FAQ

JSON to XML, answered.

How do I convert JSON to XML online?+

Paste your JSON into the converter above and press Convert to XML. The tool wraps your data in a root element, turns keys into elements, and pretty-prints the result. You can copy it or download a .xml file. Everything runs in your browser, so nothing is uploaded.

Can I control attributes vs elements?+

Yes. Any JSON key that starts with @ becomes an XML attribute on its parent element, and a key named #text becomes the element's text content. So { "book": { "@id": 1, "#text": "Title" } } produces <book id="1">Title</book>. You can also set the root name and the element name used for array items.

How are arrays converted to XML?+

Each array item is emitted as a repeated element. At the top level, items use the array-item name you choose (default item) inside the root; nested arrays repeat their key, so a tags array becomes several <tags> elements.

Is my data kept private?+

Completely. Unlike converters that default to publicly sharing your data via a link, this tool runs 100% client-side. Your JSON is converted locally and is never uploaded, stored, or shared — safe for configuration and private payloads.

Can I minify the XML or drop the declaration?+

Yes. Choose Minify to output XML on a single line with no indentation, and toggle the <?xml …?> declaration on or off to match what your consumer expects.