XML to JSON converter

Paste XML, such as a SOAP response, an RSS feed or a config file, and see it as JSON below, as you type.

Attributes and text

Attributes become keys starting with @ ("@id"), and text next to child elements becomes "#text". An element holding only text becomes a plain string, and an empty element an empty string.

Repeated elements

Elements that repeat under the same parent, such as several <item>, become a list; one alone stays a single value.

SOAP, RSS and namespaces

A SOAP response becomes nested objects you can read at a glance, with prefixes kept in the keys ("soap:Body") and namespace declarations as attributes ("@xmlns:soap"). An RSS feed becomes its channel, with its items as a list.

Entities, CDATA and comments

Entities such as &amp; are decoded and CDATA sections become their text. Comments and the <?xml ?> declaration are left out. Values stay text, since XML has no numbers of its own.

Copy, download or keep editing

The JSON follows your typing, and a mistake in what you paste is pointed out first, with its line and column. Copy or Download take the JSON as it is; Use as text puts it in the editor in place of what you pasted (Ctrl+Z goes back).

Private: nothing is uploaded

Formatting, checking and comparing all happen in your browser. Your documents are saved in the browser's own storage on this computer, not on a server, so they never leave your device.

With your permission, we count anonymous visits (which pages and tools are used), never what you type. See Privacy.

Questions

How do I convert XML to JSON?

Paste or open the XML: the JSON appears below it straight away, ready to copy or download.

Can I convert JSON back to XML?

Not yet. XML has things JSON lacks, such as attributes and text mixed with elements, so going back needs rules of its own.

Is my data uploaded anywhere?

Your documents aren't: everything runs in your browser, and they are saved on your computer, in the browser's storage for this site. With your permission we count anonymous visits, never their content.

More tools