Skip to content

XML Formatter

Beautify or minify XML with proper indentation.

Options

Private by design. This tool runs entirely in your browser. Your input is processed on your own device and is not uploaded by DO101.

About the XML Formatter

Re-indent XML so nesting is visible at a glance, or strip it back to a single line for transmission. Works on any XML including SVG, RSS, SOAP and configuration files.

How to use it

  1. 1Paste your XML.
  2. 2Choose beautify or minify.
  3. 3Copy the result.

What you get

  • 2 or 4 space indentation
  • Minify mode
  • Handles declarations, comments and CDATA
  • Works with SVG and RSS
  • Runs in your browser

Frequently asked questions

Does it validate my XML?

This tool re-indents rather than validates. Use XML to JSON, which parses strictly, if you need to know whether the document is well formed.

Will it break CDATA sections?

Formatting works on tag boundaries, so CDATA content is preserved as written.

People who use this tool usually reach for these next.