SOAP to JSON Converter
CV-66Paste a SOAP request or response and get JSON. You can convert the whole envelope or only the Body, and namespace prefixes are removed unless you keep them.
Runs in your browser. Nothing is uploaded.
SOAP XML
JSON
How to use it
- Paste the SOAP XML into the input box, or open a file and drop it on the box.
- Choose Whole envelope or Body only.
- Turn on Keep namespace prefixes if two elements share a name and differ only by prefix.
- Copy the JSON or download it as a .json file.
How the XML is mapped
Attributes become keys that start with @. Text next to attributes or child elements goes under #text. An element that appears more than once under the same parent becomes an array, and one that appears once stays a single value, so the shape can change between messages. Namespace declarations are dropped, and by default prefixes such as soap: and m: are removed from names, so Envelope, Body and GetUserResponse read cleanly.
Values stay text
Every value is a string, as in the message. Numbers and true or false are not converted, and an xsi:nil="true" attribute is kept as @nil, not changed into null. A SOAP Fault is converted like any other element, so a client can read faultcode and faultstring from the Body. Comments and the XML declaration are dropped. The message is not validated against a WSDL or a schema.
Whole envelope or Body only
Whole envelope keeps the Header and Body together under Envelope. Body only returns the content of the Body element, which is usually the part an API client cares about. The root element has to be an Envelope, with any prefix. SOAP 1.1 and 1.2 messages both work because only the local name is checked.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
The root element is <html>, not a SOAP <Envelope>. Paste the whole SOAP message, including the Envelope. | The XML does not start with an Envelope element. | Paste the full message, from <Envelope> to </Envelope>. |
The SOAP Envelope has no <Body> element. | Body only was chosen but the Envelope has no Body child. | Check the message, or use Whole envelope. |
Questions people ask
How do I convert SOAP XML to JSON?
Paste the SOAP message and pick Whole envelope or Body only. The JSON appears as you type. Copy it or download it. Nothing leaves your browser, so it is fine for messages with real data.
Why are the namespace prefixes gone?
They are removed by default so names are easier to read. Turn on Keep namespace prefixes to leave names like m:User untouched, which is useful if two elements differ only by prefix.
Does it work for SOAP 1.2?
Yes. The tool only checks that the root element is named Envelope, so the 1.1 and 1.2 namespaces both work. The result updates as soon as you change the input or an option.
How are repeated elements shown?
An element that appears more than once under the same parent becomes a JSON array. An element that appears once is a single value, so the same field can be an array in one message and a value in another.
Does it convert numbers and booleans?
No. All values stay as text, exactly as sent. Convert them in your own code, where you know which fields are numbers. You can try it with the sample first to see the output.
About this tool
The root element must be a SOAP Envelope; the prefix does not matter. Whole envelope converts Header and Body together, and Body only converts just the content of the Body, which is often the part you want. Attributes become keys that start with @, text next to attributes or child elements goes under #text, and an element that appears more than once under the same parent becomes an array. Every value is text: numbers and true/false are not converted, and xsi:nil="true" is kept as an attribute instead of becoming null. Namespace declarations (xmlns) are dropped. Namespace prefixes are removed from names by default; turn on the option to keep them, which avoids merging two elements that only differ by prefix. A SOAP Fault is converted like any other element. Comments and the XML declaration are dropped. The message is not checked against a WSDL or schema.