XML to JSON Converter

Convert data between XML and JSON in either direction.

Bridging two data formats

XML and JSON both represent structured data, but different systems prefer different ones — a legacy SOAP service speaks XML while a modern app expects JSON, and somewhere they have to meet. This converts between the two in both directions, so you can turn an XML response into JSON you can work with, or produce XML from JSON for a system that demands it.

Paste XML to get JSON, or paste JSON to get XML.

Where the two don't map perfectly

The conversion is mostly clean, but the formats are not identical in what they can express, so a few things need care. XML has attributes and JSON does not, so attributes are usually mapped to specially-named fields. XML makes no distinction between a single element and a list of one, which can make arrays ambiguous. And XML namespaces have no JSON equivalent. For most everyday data the round trip is faithful; for complex XML, check that the structure came across the way you expect.

Frequently asked questions

Can it convert both ways?

Yes — XML to JSON and JSON to XML.

Does everything map cleanly between the two?

Mostly, but XML attributes, namespaces and single-versus-list ambiguity need care, so check complex XML came across as expected.

Is my data uploaded?

No. The conversion happens in your browser.

More Developer tools