XML Formatter / Minifier

Indent XML by tag nesting, or compress into a compact single line

How to use

  1. Paste the document into the "XML content" box.
  2. Click "Format" to indent by tag nesting, or "Minify" to compress into a single line.
  3. The result is in "Result"; click "Copy" to take it.
  4. Tip: minify only removes whitespace between tags; node and attribute order stay unchanged.

FAQ

How are extra spaces between tags handled?

When formatting, pure-whitespace text between tags is removed; only real text content inside tags is kept and indented.

Does minification change node order?

No. Minify only removes whitespace between tags; node and attribute order remain completely unchanged.