SOAP Formatter Online — Format & Beautify SOAP Messages

Format SOAP envelope, Header, and Body messages captured from production. Preserve xmlns:soap and xmlns:soapenv prefixes, indent requests, responses, and Faults — entirely in your browser.

What is a SOAP Formatter?

A SOAP formatter takes a SOAP message — typically captured as one continuous XML string from a server log, gateway trace, or curl session — and re-emits it with consistent indentation so the <soap:Envelope>, <soap:Header>, and <soap:Body> structure becomes obvious. SOAP is the XML messaging protocol that powers banking, healthcare (HL7), telecom OSS/BSS, government tax-filing, and large enterprise integrations, and SOAP messages on the wire are usually unindented for compactness.

The OpenFormatter SOAP formatter parses the envelope with the browser's native DOMParser, preserves every xmlns:soap, xmlns:soapenv, xmlns:wsa, and xmlns:wsse declaration, and re-serialises the tree with your chosen indent width. Crucially, it runs entirely client-side — production SOAP traffic frequently carries WS-Security tokens, signed timestamps, customer PII, and authentication credentials that you cannot paste into a third-party server-side formatter.

How to format a SOAP message — 4 steps

  1. Paste your SOAP message. Grab the envelope from a curl trace, log line, gateway capture, or SoapUI session. Click Load Sample to try a stock-quote request with an authenticated soap:Header.
  2. Pick an indent width. Two spaces matches typical SOAP toolchain output; four spaces matches generic XML style guides.
  3. Click Format. The browser's DOMParser parses the envelope, the formatter walks the tree, and Envelope/Header/Body become cleanly nested. Errors surface with a parser reason.
  4. Copy the result. Click Copy to grab the formatted message. Drop it into a ticket, a code review, the team wiki, or a regression-test fixture.

Sample input vs. formatted output

Input (one-line SOAP envelope)

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><stk:GetLastTradePriceRequest xmlns:stk="http://example.com/stockquote"><stk:tickerSymbol>AAPL</stk:tickerSymbol></stk:GetLastTradePriceRequest></soap:Body></soap:Envelope>

Output (indented, readable)

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <stk:GetLastTradePriceRequest xmlns:stk="http://example.com/stockquote">
      <stk:tickerSymbol>AAPL</stk:tickerSymbol>
    </stk:GetLastTradePriceRequest>
  </soap:Body>
</soap:Envelope>

Envelope-Aware Layout

Envelope, Header, and Body each get their own indented hierarchy. Nested WS-Security tokens, WS-Addressing headers, and Fault detail blocks unfold cleanly so you can spot the issue at a glance.

Namespace Preservation

Every xmlns:soap, xmlns:soapenv, xmlns:soap12, xmlns:wsa, xmlns:wsse, and business-namespace declaration is kept exactly. Output round-trips through Apache CXF, Spring-WS, WCF, and zeep without prefix loss.

Client-Side Only

WS-Security tokens, signed timestamps, customer PII, and credentials in your captured traffic stay on your device. No upload, no rate limit — verify with DevTools Network.

Common use cases

  • check_circleReading a SOAP request captured from a production curl trace during incident debugging
  • check_circleBeautifying a SOAP response before diffing it against a regression-test golden file
  • check_circleDecoding a SOAP Fault to find the faultcode, faultstring, and application-specific detail
  • check_circleFormatting envelopes captured from an Apache CXF, Spring-WS, .NET WCF, or zeep client log
  • check_circleUnfurling WS-Security headers (Timestamp, UsernameToken, BinarySecurityToken) for review
  • check_circlePretty-printing SOAP test fixtures before committing to version control
  • check_circleAdding readable SOAP examples to API integration docs and developer onboarding pages
  • check_circleInspecting WS-Addressing wsa:To/wsa:Action headers when debugging routing problems

SOAP formatter vs. WSDL formatter vs. XML formatter

A generic XML formatter handles arbitrary documents. The WSDL formatter targets contracts — the static service description consumed at design time. The SOAP formatter targets messages exchanged at runtime: request, response, Fault. All three speak XML, but the SOAP formatter is tuned around the envelope structure (Envelope, Header, Body, Fault) and the namespaces (soap:, soapenv:, wsse:, wsa:) you'll encounter in any SOAP debugging session.

Need more SOAP/XML tooling?

Format WSDL contracts, validate XML, view trees, or convert XML to JSON — all browser-side.

Frequently Asked Questions

What is SOAP?

SOAP — Simple Object Access Protocol — is an XML-based messaging protocol for exchanging structured information between web services. A SOAP message is a single XML document called an envelope, transported over HTTP, JMS, or SMTP. SOAP predates REST and is still common in enterprise integrations, banking, healthcare (HL7), telecom OSS/BSS, and government tax-filing systems.

How is a SOAP envelope structured?

Every SOAP message wraps its content in a single root <soap:Envelope> element. The envelope contains an optional <soap:Header> for cross-cutting metadata (authentication, transaction IDs, message IDs, addressing) and a required <soap:Body> with the actual request, response, or Fault payload. The Header is processed by SOAP intermediaries; the Body is the application-level data.

Will the formatter preserve xmlns:soap and xmlns:soapenv prefixes?

Yes. Both the SOAP 1.1 prefix (xmlns:soapenv pointing to schemas.xmlsoap.org/soap/envelope) and the SOAP 1.2 prefix (xmlns:soap pointing to www.w3.org/2003/05/soap-envelope) are preserved exactly as they appear on the source. Custom prefixes (xmlns:wsa for WS-Addressing, xmlns:wsse for WS-Security, business namespaces) are likewise untouched. The DOMParser is namespace-aware and round-trip-safe.

Can I format both request and response messages?

Yes. SOAP requests, responses, and Fault messages all share the same envelope structure — the formatter handles them identically. Paste a request captured from a curl trace, a response logged by a SOAP gateway, or a SOAP Fault returned during error debugging. The formatter indents the envelope, headers, body elements, and any nested faultcode/faultstring/detail blocks for readable diff and review.

How does SOAP differ from REST/JSON?

REST uses HTTP verbs (GET, POST, PUT, DELETE) on resource URLs and typically carries JSON. SOAP exchanges XML envelopes — almost always over HTTP POST — described by a WSDL contract. SOAP standardises features REST leaves to convention: WS-Security for message-level signing, WS-ReliableMessaging for guaranteed delivery, WS-Addressing for routing. That extra ceremony is overkill for a typical web API but exactly what regulated enterprises need.

Does formatting change the SOAP message semantics?

No. SOAP processors parse the XML structure, not whitespace. An indented envelope and a one-line envelope produce identical results when consumed by Apache CXF, Spring-WS, .NET WCF, zeep, or PHP SoapClient. The formatter is a pure readability transform — useful for debugging, code review, and documentation, but never required for the message to deliver.

Can I format a SOAP Fault?

Yes — SOAP Faults are just envelopes with <soap:Fault> as the body content, holding faultcode, faultstring, faultactor, and detail children. Formatting makes the Fault readable so you can quickly diagnose whether it's a Client, Server, MustUnderstand, or VersionMismatch fault, and read the detail element to find the application-specific error.

Are SOAP messages with WS-Security headers safe to paste?

Yes — and that's the point of client-side formatting. WS-Security headers carry signed timestamps, encrypted UsernameTokens, BinarySecurityTokens, and certificate references. The formatter runs entirely in your browser using the native DOMParser; nothing is uploaded. Verify with DevTools Network — zero requests fire when you click Format. That guarantee matters when the captured traffic includes credentials.

SOAP Formatter Online — Format & Beautify SOAP Messages