JSON to XML

Turn JSON into XML, with @keys as attributes and lists as repeated tags

  • Runs in your browser
  • Free
  • No sign-up
Loading JSON to XML…

How to use it

  1. Paste your JSON into the box, or press Open file.
  2. Choose the name of the root tag if the JSON needs one.
  3. Copy the XML, or download it.

Questions

How do attributes work?

A key that starts with @ becomes an attribute of its parent, and a key named #text is the text of the tag. {"price": {"@currency": "USD", "#text": 5}} gives <price currency="USD">5</price>.

How are lists written?

Each item becomes a tag with the list's key as its name, so {"book": [1, 2]} gives <book>1</book><book>2</book>. A list at the very top is wrapped in <root><item>…</item></root>. XML cannot show an empty list or a list inside a list, so the first is left out, the second joins the list around it, and the message above the result counts them.

What if a key is not a valid XML name?

With Fix names on, spaces and symbols become _ and the changes are listed above the result. With it off you get an error that names the key.

Are big numbers kept?

Yes. Numbers are copied exactly as written, so 12345678901234567890 and 1.10 are not changed.

Is my data uploaded anywhere?

No. The conversion runs in your browser. Your text is not sent to a server.

Is my text sent to a server?

No. Everything happens in your browser. Your text is not uploaded or stored.

Is it free?

Yes, you can use it for free. A subscription removes limits and unlocks premium tools.