SOAP to JSON Converter

Paste a SOAP request or response and pull the payload out of the envelope as plain JSON.

SOAP XML
JSON
Runs locally in your browser

About the SOAP to JSON Converter

A SOAP response carries maybe ten percent signal. The rest is the envelope, the namespace declarations and the prefixes stamped on every single element. This converter throws that scaffolding away: it locates the Body regardless of which prefix the service used for the SOAP namespace, converts the payload beneath it, and by default removes the prefix from every element and attribute name so frt:QuoteId becomes a plain QuoteId key.

Values are typed on the way through. A field holding 4 becomes the number 4, false becomes a boolean, and anything else stays a string, which matters when the JSON goes straight into a test assertion. Repeated sibling elements collapse into an array, so two Surcharge elements produce a two item list rather than one key overwriting the other. Attributes are prefixed with @ by default so a currency attribute never collides with a child element of the same name.

Fault responses are handled the same way as successful ones, and the status line reports SOAP Fault when a Fault element is present anywhere in the message, so a failure is obvious at a glance. Switch Extract to Header when you need the security or correlation block instead, or to the whole envelope when you are documenting a message end to end. For the service contract that defines these messages, use WSDL to JSON.

How to use

  1. Copy a SOAP request or response from your client, proxy or log and paste it in.
  2. Leave Extract on Body payload for the part you usually care about.
  3. Untick Strip namespace prefixes if you need to keep prefixes such as frt: in the keys.
  4. Untick Keep the response wrapper element to unwrap a single top level operation element.
  5. Copy the JSON or download it for a fixture file.

Common questions

What if the message is not a SOAP envelope?
The document is still converted, and the status line points out that no envelope was found so you know why the whole tree came back.
How do I spot a SOAP fault?
The status beside the output reads SOAP Fault whenever a Fault element exists, and the fault code and string appear in the JSON.
Are xmlns declarations included in the output?
No. While prefix stripping is on, xmlns and xmlns:* attributes are dropped because the names they qualify have already been simplified.
Does it validate the message against a WSDL?
No. It converts whatever XML you paste. Schema validation needs the contract and a validating parser.