SOAP XML Prettifier & Indenter
Paste minified or messy SOAP envelope XML, instantly format with proper indentation and syntax highlighting
Paste minified or tangled SOAP envelope XML and get properly indented, syntax-highlighted output in one click — works with both SOAP 1.1 and 1.2, keeps every namespace prefix intact, and can minify bloated payloads back to a single line. And everything runs in your browser. Nothing gets uploaded.
How It Works
The formatter reads your SOAP XML as a text stream, identifies every opening tag, closing tag, self-closing element, comment, and CDATA block. It rebuilds the document line by line with your chosen indentation (2 or 4 spaces). Namespace prefixes like soap:, soapenv:, and wsdl: stay exactly where they were — nothing gets renamed or stripped.
Examples
Basic GetUser Request
A typical SOAP 1.1 request that came back from a log file as a single line.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><GetUser><UserId>4821</UserId></GetUser></soap:Body></soap:Envelope>
<soap:Envelope
xmlns:soap="...">
<soap:Body>
<GetUser>
<UserId>4821</UserId>
</GetUser>
</soap:Body>
</soap:Envelope>
SOAP Fault Response
Your payment gateway returned an error. The fault detail is buried in a wall of XML and you need to find the error code fast.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>Invalid card number</faultstring><detail><errorCode>PAY-4012</errorCode></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
<soapenv:Envelope ...>
<soapenv:Body>
<soapenv:Fault>
<faultcode>
soapenv:Client
</faultcode>
<faultstring>
Invalid card number
</faultstring>
<detail>
<errorCode>PAY-4012</errorCode>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
SOAP 1.2 with Header and WS-Security
An enterprise SOAP message with authentication headers and multiple namespaces — exactly the kind of XML that's painful to read without formatting.
<soap12:Envelope xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/..."><soap12:Header><wsse:Security><wsse:UsernameToken><wsse:Username>admin</wsse:Username></wsse:UsernameToken></wsse:Security></soap12:Header><soap12:Body><GetReport/></soap12:Body></soap12:Envelope>
<soap12:Envelope
xmlns:soap12="..."
xmlns:wsse="...">
<soap12:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>
admin
</wsse:Username>
</wsse:UsernameToken>
</wsse:Security>
</soap12:Header>
<soap12:Body>
<GetReport/>
</soap12:Body>
</soap12:Envelope>
Who Uses This
Debugging SOAP API requests and responses pulled from logs or network traces.
Comparing expected vs actual SOAP payloads during integration testing.
Reviewing WSDL-generated SOAP structures for service contracts and documentation.
Inspecting SOAP messages from monitoring tools and load balancer logs.
Common Mistakes
If your SOAP XML came from a URL parameter or HTTP log, it might have %3C instead of < and %3E instead of >. Run it through a URL decoder first, then paste it here.
Some tools strip the <?xml version="1.0"?> declaration when copying. The formatter works fine without it, but if your downstream system expects it, add it back before the <soap:Envelope> tag.
You copied only part of the SOAP message and the namespace declaration (xmlns:soap=...) is in a parent element you didn't include. The formatter will still indent the XML, but you might see a "namespace not declared" warning in other tools later.
Technical Details
- Processing: 100% client-side JavaScript — nothing uploaded
- Browser Support: Chrome, Firefox, Safari, Edge
- SOAP Versions: 1.1 and 1.2 envelopes handled identically
- Indentation: 2 or 4 spaces (configurable)
- Preserves: Namespaces, CDATA, comments, processing instructions
Frequently Asked Questions
What is a SOAP XML formatter?
It takes minified or messy SOAP envelope XML and reformats it with proper indentation and line breaks. You get readable markup without changing the actual content or structure of the message.
Does this handle SOAP namespaces correctly?
Yes. Every namespace prefix — soap:, soapenv:, wsdl:, custom ones — stays exactly as-is. The formatter doesn't rename, remove, or reorder namespace declarations. They'll also get syntax-highlighted so you can spot them quickly.
Can I format SOAP fault responses?
Absolutely. Fault elements, faultcodes, faultstrings, detail blocks — they're all just XML under the hood. The formatter indents them like any other element, making it much easier to read error details buried in a SOAP fault.
What's the difference between SOAP 1.1 and 1.2?
Both are XML. The big difference is the namespace URI — 1.1 uses schemas.xmlsoap.org and 1.2 uses w3.org/2003/05/soap-envelope. Formatting-wise, they're identical. This tool handles both without any configuration.
Is my SOAP data safe in this tool?
Completely. The formatting happens in your browser's JavaScript engine — your SOAP XML never gets sent anywhere. No server, no cookies, no analytics on your input. Disconnect from the internet and it still works. That matters because SOAP messages often carry auth tokens, PII, or financial data.