WSDL Formatter

Beautify WSDL XML service descriptions

Input

2 spaces

Formatted

Formatted XML will appear here

About

Beautify a WSDL (Web Services Description Language) document. Parses, indents, and re-emits clean XML, preserving namespaces. Runs in your browser; nothing is uploaded.

    Examples

    Beautify a WSDL 1.1 document

    Input
    <?xml version="1.0"?><definitions name="Hello" targetNamespace="http://example.com/hello" xmlns:tns="http://example.com/hello" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/"><message name="SayHelloRequest"><part name="name" type="xsd:string"/></message><portType name="HelloPort"><operation name="SayHello"><input message="tns:SayHelloRequest"/></operation></portType><binding name="HelloBinding" type="tns:HelloPort"><soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/><operation name="SayHello"><soap:operation soapAction="SayHello"/><input><soap:body use="encoded" namespace="http://example.com/hello"/></input></operation></binding><service name="HelloService"><port name="HelloPort" binding="tns:HelloBinding"><soap:address location="http://example.com/hello"/></port></service></definitions>
    Output
    <?xml version="1.0"?>
    <definitions name="Hello" targetNamespace="http://example.com/hello" ...>
      <message name="SayHelloRequest">
        <part name="name" type="xsd:string"/>
      </message>
      <portType name="HelloPort">
        <operation name="SayHello">
          <input message="tns:SayHelloRequest"/>
        </operation>
      </portType>
      <binding name="HelloBinding" type="tns:HelloPort">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="SayHello">
          <soap:operation soapAction="SayHello"/>
          <input>
            <soap:body use="encoded" namespace="http://example.com/hello"/>
          </input>
        </operation>
      </binding>
      <service name="HelloService">
        <port name="HelloPort" binding="tns:HelloBinding">
          <soap:address location="http://example.com/hello"/>
        </port>
      </service>
    </definitions>

    The compact definitions block is split into the four WSDL 1.1 sections — message, portType, binding, service — so each operation and its parts are immediately readable.

    Format a WSDL 2.0 description

    Input
    <?xml version="1.0"?><description xmlns="http://www.w3.org/ns/wsdl" targetNamespace="http://example.com/hello"><interface name="HelloInterface"><operation name="SayHello" pattern="http://www.w3.org/ns/wsdl/in-out"><input messageLabel="In" element="xsd:string"/><output messageLabel="Out" element="xsd:string"/></operation></interface><service name="HelloService" interface="tns:HelloInterface"><endpoint name="HelloEndpoint" binding="soap:binding" address="http://example.com/hello"/></service></description>
    Output
    ... <interface> ... <operation> ... </operation> </interface> <service> ... </service> ...

    WSDL 2.0 uses interface and endpoint elements instead of portType/port. The formatter detects the namespace and indents accordingly.

    About this tool

    The WSDL Formatter beautifies WSDL 1.1 and 2.0 service descriptions with configurable indentation. It auto-detects the WSDL version from the root namespace and re-emits the document with the four 1.1 sections (message, portType, binding, service) or the 2.0 sections (interface, binding, service) properly indented.

    The tool preserves namespace prefixes and imports so the formatted output round-trips through any SOAP client or WSDL-aware tool. It validates well-formedness only — a parse here does not guarantee schema-validity against the WSDL spec.

    How to use

    1. Paste a WSDL document

      Drop the WSDL into the editor, or load a sample to see the WSDL 1.1 / 2.0 sections split out.

    2. Choose an indent

      Set the indent width so the output matches your team's style.

    3. Copy the formatted XML

      Click Copy to copy the beautified WSDL, or download it for documentation and diffs.

    Use cases

    Reading a vendor's WSDL contract

    Pretty-print a WSDL downloaded from a partner or generated by a SOAP stack so you can read the operations, bindings, and message types before integrating.

    Diffing two WSDL versions

    Format both versions the same way before running a diff, so the comparison is structural and not just whitespace noise.

    Auditing a service definition

    Inspect a WSDL to confirm the operations, transport, and SOAPAction values are what the team expects before publishing a new service.

    Common mistakes

    Mistake:Treating WSDL 1.1 and 2.0 as the same format.

    Fix:They use different root elements (definitions vs description) and different namespaces. A WSDL 2.0 document is not a valid WSDL 1.1 file.

    Mistake:Assuming the SOAP action reveals the operation.

    Fix:soapAction is a hint, not a contract. The real operation name comes from the binding's operation element; mismatched values are a common source of integration bugs.

    Mistake:Forgetting that imports mean a WSDL is split across files.

    Fix:A WSDL may <xsd:import> or <wsdl:import> additional schemas. The formatter only beautifies the file you give it; external imports are not pulled in.

    Frequently asked questions

    References & standards