SOAP Formatter
Beautify SOAP XML request and response envelopes
Input
Formatted
About
Beautify a SOAP XML request or response envelope. Parses the document, indents it, and re-emits clean XML. Handles namespaces and the SOAP Envelope/Header/Body structure. Runs in your browser; nothing is uploaded.
Examples
Beautify a SOAP 1.2 envelope
<?xml version="1.0"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><m:GetStock xmlns:m="http://example.com/stock"><m:Symbol>IBM</m:Symbol></m:GetStock></soap:Body></soap:Envelope><?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<m:GetStock xmlns:m="http://example.com/stock">
<m:Symbol>IBM</m:Symbol>
</m:GetStock>
</soap:Body>
</soap:Envelope>The compact one-line envelope is re-indented so the envelope, body, and the user's operation are immediately readable.
Format a SOAP Fault
<?xml version="1.0"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><soap:Fault><soap:Code><soap:Value>soap:Receiver</soap:Value></soap:Code><soap:Reason><soap:Text>Server error</soap:Text></soap:Reason></soap:Fault></soap:Body></soap:Envelope>...
<soap:Body>
<soap:Fault>
<soap:Code>
<soap:Value>soap:Receiver</soap:Value>
</soap:Code>
<soap:Reason>
<soap:Text>Server error</soap:Text>
</soap:Reason>
</soap:Fault>
</soap:Body>
...Fault sub-elements (Code, Reason, and optional Detail) are indented at the right level so the failure mode is obvious at a glance.
About this tool
The SOAP Formatter beautifies SOAP 1.1 and 1.2 request and response envelopes with configurable indentation. It parses the envelope, the optional header, the body, and any SOAP Fault sub-elements, then re-emits them as readable, properly-namespaced XML.
Namespace prefixes (soap:, xsi:, m:, and your service-specific ones) are preserved verbatim, so the formatted output round-trips through any SOAP client without changes. Formatting runs entirely in your browser; the message is never transmitted or stored.
How to use
Paste a SOAP message
Drop a SOAP envelope into the editor, or load a sample 1.1 or 1.2 message to see the indentation immediately.
Choose an indent
Set the indent width (2 or 4 spaces is most common) to match your team's style.
Copy the formatted XML
Click Copy to copy the beautified envelope, or download it for use in documentation or test fixtures.
Use cases
Reading a SOAP response from a logs file
Pretty-print a compact SOAP response captured by a proxy or logger so the envelope, body, and any fault are easy to scan.
Preparing SOAP examples for documentation
Format a request or response to put in a developer guide without making readers scroll through a maze of brackets.
Checking XML well-formedness
Use the formatter as a quick XML linter — unbalanced tags or missing namespace declarations show up as parse errors.
Common mistakes
Mistake:Confusing SOAP 1.1 and SOAP 1.2 namespaces.
Fix:They use different namespaces (http://schemas.xmlsoap.org/soap/envelope/ vs http://www.w3.org/2003/05/soap-envelope). A 1.1 envelope is not valid as a 1.2 envelope, and vice versa.
Mistake:Reformatting a SOAP message that contains a digital signature.
Fix:Whitespace inside a signed element is part of the signed data. After canonicalizing and signing, don't reformat the document — keep the canonical form for verification.
Mistake:Stripping xmlns prefixes from the output.
Fix:Removing a namespace prefix breaks the envelope — the consumer expects SOAP-ENV, xsi, or your operation namespace to be available. The formatter preserves all prefixes.
Frequently asked questions
References & standards
Related tools
Driver's License Generator
Generate driver's license numbers in the correct format for 21 countries and all 50 US states, plus a format and Luhn validator — test data only, runs in your browser.
Address Generator
Generate realistic addresses in the correct format for 21 countries — single-line, multi-line, JSON or HTML — plus a postcode validator. Test data only, runs in your browser.
Phone Number Generator
Generate phone numbers in the correct format per country — mobile, landline and toll-free — in international, national, raw or tel: format, plus a validator. Test data only.
XML to JSON Converter
Convert XML data to JSON format with attribute handling, configurable parsing options, and live statistics
Markdown to HTML Converter
Convert Markdown to clean HTML with GitHub-Flavored Markdown, syntax highlighting, and optional sanitization
Docker Run to Compose Converter
Convert a docker run command into a docker-compose.yml service definition with full flag support