Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

SOAP XML to JSON Converter

Paste a SOAP XML envelope and instantly convert it to clean JSON with namespace stripping and body extraction

Your files never leave your browser
SOAP XML Input0 chars, 0 lines
JSON Output0 chars, 0 lines
Ready·

Paste a SOAP XML envelope and get structured JSON back in one click — namespace prefixes stripped, Body content extracted, indentation applied. Handles nested elements, attributes, and fault responses without extra config. And everything runs in your browser. Nothing gets uploaded.

How It Works

Paste SOAP XML
➔
Parse & Extract Body
➔
Output Clean JSON

Your browser’s built-in DOMParser reads the SOAP XML, locates the Envelope, Header, and Body elements, then recursively walks each node to build a JSON object. Namespace prefixes get stripped by default (so soap:Body becomes just Body). The result is syntax-highlighted and ready to copy or download as a .json file.

Examples

Simple GetUser Response

A typical SOAP response from a user lookup service — one of the most common things you’ll need to convert.

INPUT
<soap:Envelope xmlns:soap="..."> <soap:Body> <GetUserResponse> <UserId>4821</UserId> <Name>Jane Park</Name> <Email>[email protected]</Email> </GetUserResponse> </soap:Body> </soap:Envelope>
OUTPUT
{ "Body": { "GetUserResponse": { "UserId": "4821", "Name": "Jane Park", "Email": "[email protected]" } } }

SOAP Fault Error

When an API returns an error, the fault details are buried inside nested XML. Converting to JSON makes the error code and message immediately visible.

INPUT
<soap:Envelope xmlns:soap="..."> <soap:Body> <soap:Fault> <faultcode>soap:Server</faultcode> <faultstring>Account suspended</faultstring> <detail> <errorCode>ERR_403</errorCode> </detail> </soap:Fault> </soap:Body> </soap:Envelope>
OUTPUT
{ "Body": { "Fault": { "faultcode": "soap:Server", "faultstring": "Account suspended", "detail": { "errorCode": "ERR_403" } } } }

Multi-Item Order Response with Attributes

Real-world SOAP responses often include XML attributes on elements. With “Include attributes” turned on, those get preserved as @-prefixed keys.

INPUT
<soap:Envelope xmlns:soap="..."> <soap:Body> <OrderResponse status="complete"> <Item id="A1">Widget</Item> <Item id="A2">Gadget</Item> <Total currency="USD">84.50</Total> </OrderResponse> </soap:Body> </soap:Envelope>
OUTPUT
{ "Body": { "OrderResponse": { "@status": "complete", "Item": [ {"@id": "A1", "#text": "Widget"}, {"@id": "A2", "#text": "Gadget"} ], "Total": { "@currency": "USD", "#text": "84.50" } } } }

Who Uses This

👨‍💻 Backend Developers

Parsing SOAP responses from legacy APIs before feeding data into modern REST or GraphQL services.

🔎 QA Engineers

Comparing SOAP response payloads by converting them to JSON for easier diff and assertion checks.

📈 Data Analysts

Pulling structured data out of SOAP exports so it can be loaded into Python, R, or spreadsheet tools.

🛠️ DevOps Engineers

Debugging SOAP-based health checks and monitoring endpoints by converting responses to JSON for log parsing.

Common Mistakes

Pasting only the Body without the Envelope

The converter looks for a <soap:Envelope> wrapper to know it’s dealing with SOAP. If you paste just the inner XML, it still converts fine — but it won’t strip the envelope automatically because there’s no envelope to strip. Paste the full response for best results.

Forgetting to enable “Include attributes”

Attributes are off by default. If your SOAP response has data stored in attributes (like id="123" or type="string"), you’ll lose that information unless you toggle the option on before converting.

Invalid XML from copy-paste errors

Copying from a log viewer or terminal sometimes chops off closing tags or adds line numbers. If you see “XML Parse Error,” check that your input starts with <?xml or <soap:Envelope and that every tag is properly closed.

Technical Details

Frequently Asked Questions

How do I convert SOAP XML to JSON?

Paste the full SOAP XML response into the input box and click Convert. The tool parses the envelope, pulls out the Body content, and gives you formatted JSON. You can copy it to your clipboard or download it as a file.

What are SOAP namespaces and should I strip them?

SOAP namespaces are prefixes like soap:, ns1:, or wsdl: attached to XML element names. They prevent naming conflicts in XML but make JSON keys ugly and hard to work with. Most people strip them — it turns ns1:GetUserResponse into just GetUserResponse.

Does this tool upload my SOAP data to a server?

No. Everything happens locally in your browser using JavaScript. Your XML is never sent anywhere. You can disconnect from the internet and the tool keeps working — that is the easiest way to verify it yourself.

Can I convert non-SOAP XML with this tool?

Yes. If the input isn’t wrapped in a SOAP Envelope, the converter treats it as plain XML and converts it to JSON anyway. It just won’t do the automatic envelope/body extraction since there is no envelope to extract from.

How are XML attributes handled in the JSON output?

Turn on “Include attributes” in the options. Attributes show up with an @ prefix — so id="42" on an element becomes "@id": "42" in the JSON. Text content inside that element goes into a #text key. Attributes are skipped by default to keep output cleaner.

Share: