Free XML Formatter & Beautifier Online
Pretty-print or minify XML and SOAP messages in your browser. Preserves comments, CDATA, namespaces and attribute order. Nothing is uploaded.
XML Formatter tool
Runs in your browser. External entities and DTDs are never loaded.
Input XML
Formatted XML
About this tool
Pretty-print compact XML and SOAP messages with consistent indentation, or minify them to a single line. Comments, CDATA sections, processing instructions, namespace declarations, attribute order and quote style are all kept.
Formatting never changes meaning: whitespace is only adjusted between elements that contain no text of their own. Mixed content and xml:space="preserve" are left exactly as written.
How to use it
- Paste XML or open a .xml file.
- Choose Beautify (2 or 4 spaces, or tabs) or Minify.
- Copy or download the result.
Limitations
- Custom entities (other than < > & ' " and character references) are not supported.
- XML 1.0 only.
Example
<order id="7"><status>SHIPPED</status><item sku="A-100" qty="2"/></order><order id="7">
<status>SHIPPED</status>
<item sku="A-100" qty="2"/>
</order>Common use cases
SOAP debugging
Make single-line SOAP envelopes from logs readable.
MuleSoft payloads
Format XML produced by DataWeave transformations before comparing or sharing them.
Configuration files
Tidy Maven POMs, Spring XML and other configuration files.