🔒 Your data never leaves your browser

XML Beautifier

Paste XML below and click Beautify. Use Minify to strip whitespace, or Validate to surface parse errors. <!--comments-->, <![CDATA[...]]> and processing instructions are preserved.

Ready. Keyboard: Ctrl+Enter Beautify · Ctrl+Shift+M Minify · Ctrl+Shift+V Validate · Ctrl+K Clear

What is XML?

XML (eXtensible Markup Language) is a text-based format for structured documents, standardised by the W3C in 1998. It is still the backbone of office document formats (DOCX, ODF), industry standards (SOAP, HL7, FIX), publishing formats (DocBook, TEI), SVG graphics, and countless configuration files. For the bigger picture, see the guide on JSON vs XML.

When to beautify, minify, or validate

  • Beautify when a long-line SOAP response or squashed SVG is impossible to read.
  • Minify to strip comments and insignificant whitespace for smaller storage or transmission.
  • Validate to catch malformed documents before they hit a stricter downstream parser.

Common XML gotchas

  • Unescaped & in text. Use &amp;.
  • Unescaped < or > in text. Use &lt; and &gt; or wrap in <![CDATA[...]]>.
  • Namespace prefix used but not declared — strict parsers reject.
  • Self-closing a non-void element as HTML-style — in XML, every element must be closed, either by a close tag or a />.

Privacy

Parsing happens entirely in your browser. Open DevTools → Network and click Beautify to confirm: no request carries your content. See the Privacy Policy.