Convert JSON to XML

Turn JSON into clean, well-formed XML.

  • Free, no sign-up
  • Runs in your browser

Drop your file here, or

TXT, CSV, JSON, Markdown, HTML, XML, DOCX, PDF, RTF and more

Type, paste with Ctrl V, or drop a file

Options

Used when the JSON has no single top-level key
Indent

or press Ctrl EnterRuns in your browser

Result

Your result will appear here.

Add your text, then press JSON to XML.

How to use JSON to XML

  1. Paste your text into the input box, or drop a file onto it.
  2. Choose your options.
  3. Press JSON to XML.
  4. Copy the result or download it in the format you need.

Example

Before
{"note":{"to":"Ada","body":"Hi"}}
After
<?xml version="1.0" encoding="UTF-8"?>
<note>
  <to>Ada</to>
  <body>Hi</body>
</note>

A single top-level key becomes the root element.

How JSON maps to XML

Each key becomes an element; arrays become repeated elements with the same name. Keys starting with @ become attributes and a #text key becomes the element’s text, matching what XML to JSON produces. Keys that aren’t valid XML names are adjusted — “first name” becomes first_name — and special characters are escaped.

What happens to your text

Your text is processed in your browser and kept only in this tab’s memory. It is not uploaded, saved or used for analytics.

Related guides

  • Explainer

    JSON vs XML vs YAML

    How JSON, XML and YAML represent the same data, what each is good at, common gotchas such as YAML’s “no” problem, and how conversion works.

Questions about JSON to XML

More answers in the TextVix FAQ.

What if my JSON is an array?

It is wrapped in a root element (named in the options), with one item element per array entry.

Are numbers kept exactly?

Yes. Numbers are written digit for digit as they appear in the JSON.

Is my text uploaded anywhere?

No. This tool runs entirely in your browser. Your text and files are never sent to a server or stored.