FormatterHQ

WSDL Formatter

Make a machine-generated WSDL readable. Types, messages, port types, bindings and services are indented so you can follow a SOAP contract from operation to endpoint.

Input XML
Output XML
Ready.

How to use the WSDL Formatter

  1. Paste the WSDL, upload a .wsdl or .xsd file, or use Load URL with the service address ending in ?wsdl.
  2. Choose an Indent and whether to Remove comments.
  3. Click Format. Validate confirms the file is well-formed; Minify compacts it.
  4. Copy or download the formatted WSDL.

A WSDL formatter for reading SOAP contracts

WSDL (Web Services Description Language) files describe what a SOAP service offers, and they are usually generated by frameworks such as JAX-WS, WCF or Apache CXF. The output is often one enormous line, which makes it hard to answer simple questions like "what does this operation return?". This WSDL formatter re-indents the document so each section and operation is visible, and it checks the XML is well-formed on the way.

Example

<definitions name="StockQuote" targetNamespace="http://example.com/stockquote.wsdl" xmlns:tns="http://example.com/stockquote.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/"><message name="GetPriceInput"><part name="ticker" type="xsd:string"/></message><portType name="StockQuotePortType"><operation name="GetPrice"><input message="tns:GetPriceInput"/></operation></portType></definitions>

becomes:

<definitions name="StockQuote" targetNamespace="http://example.com/stockquote.wsdl" xmlns:tns="http://example.com/stockquote.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/">
  <message name="GetPriceInput">
    <part name="ticker" type="xsd:string"/>
  </message>
  <portType name="StockQuotePortType">
    <operation name="GetPrice">
      <input message="tns:GetPriceInput"/>
    </operation>
  </portType>
</definitions>

Reading a WSDL 1.1 file, top to bottom

SectionWhat it defines
<types>The data types used in messages, normally as an embedded XML Schema.
<message>The input and output payloads, each made of named <part> elements.
<portType>The abstract interface: operations and which messages they take and return.
<binding>How a port type maps onto a protocol, such as SOAP style (rpc or document) and soapAction values.
<service>Concrete endpoints: each <port> points to a binding and has an address.

To trace an operation, start at the <soap:address location> in the service, follow the port's binding attribute, then the binding's type to the port type, and from the operation to its messages. The tns: prefix in these references points to the WSDL's own target namespace. WSDL 2.0 uses different names (description, interface, endpoint), but it is formatted the same way.

Tips for real-world WSDL files

  • Imported schemas. Many WSDLs reference external XSD files with xsd:import or wsdl:import. The formatter works on the file you paste; load each imported XSD separately to read it.
  • Validate means well-formed. The Validate button reports Valid WSDL ✓ with the root element and element count. It does not check that every tns: reference points to an existing message or binding.
  • Documentation blocks. <documentation> elements are content, not comments, so they are kept even with Remove comments on.

Once you know the operation, format the request and response envelopes with the SOAP formatter. To list every operation name quickly, run //*[local-name()='operation']/@name in the XPath tester. The general XML formatter has the same options for any other XML.

Frequently asked questions

Can I load a WSDL directly from a service URL?
Yes. Click Load URL and enter the address, typically the endpoint followed by ?wsdl. The file is fetched through our server, so the service must be reachable from the public internet.
Does the formatter check that my WSDL is correct?
It checks that the file is well-formed XML and reports errors with line and column. It does not validate the WSDL against the WSDL schema or resolve references between messages, port types and bindings.
Does it support WSDL 2.0?
Yes for formatting and well-formedness, because WSDL 2.0 is XML too. The element names differ from WSDL 1.1, but indentation and validation work the same.
Why does my WSDL contain an embedded schema?
The types section usually holds an XML Schema that defines request and response elements. It is part of the WSDL and is formatted along with the rest of the document.
Can I generate client code from a WSDL?
Yes, most platforms have a generator. Java projects use wsimport from Jakarta XML Web Services (it was removed from the JDK in Java 11) or the jaxws Maven plugin, .NET uses dotnet-svcutil, and Python's zeep library reads the WSDL at runtime; python -m zeep service.wsdl prints every operation and its parameters. Formatting the WSDL first makes it easier to check what those tools will generate.
Why does my WSDL contain two bindings for the same operations?
Frameworks such as WCF often publish one binding for SOAP 1.1 and another for SOAP 1.2, both pointing at the same port type. They differ in the envelope namespace and the Content-Type header. Pick the binding your client library supports; the operations and messages are identical.

Last updated October 3, 2026

Related tools