Formatters

XML to JSON

Convert an XML document to JSON.

How to use XML to JSON

XML to JSON — Turn an XML document into JSON, with attributes and repeated child elements kept. Free to use in D2i DevTools — no account required.

Steps

  1. Fill in XML. This field is required.
  2. Click Run and copy the result under the form.

Frequently asked questions

What is XML to JSON used for?

Use it when a service still returns XML and the rest of your tools expect JSON.

How do I use the free online XML to JSON tool?

Fill in XML. This field is required. Click Run and copy the result under the form.

What can I paste or upload into XML to JSON?

Paste one XML document with a single root element. Namespaces are reduced to the local tag name.

What output does XML to JSON give me?

Pretty JSON. A leaf element becomes a string. Attributes use an @ prefix. Repeated children become an array.

Is XML to JSON free, and is my input private?

Yes — Your input is processed in memory for this request only. It is not saved to disk or the database, and it is cleared after the tool finishes.

Where does the element text go?

Plain text with no attributes becomes the value. If the element also has attributes or children, the text is stored as #text.

Inputs are processed in memory only and are not saved to disk or the database. Data exists only for the duration of your request.