XML Formatter

Pretty-print or minify XML, sitemaps and configs.

What it does

The formatter parses your XML and re-emits it with consistent indentation, so deeply nested documents — Android layouts, Maven POMs, .NET configs, WordPress exports — become scannable. It preserves comments and text content; whitespace between elements is treated as markup structure and normalized to the indentation you choose.

Minify does the opposite: strips whitespace-only text nodes and newlines to produce the most compact valid XML, useful for inline data URIs or shaving bytes off config payloads. All parsing is local — nothing leaves your browser.

FAQ

It says "invalid XML" — what's wrong?

Most often an unclosed tag, mismatched case (XHTML is case-sensitive: <div> ≠ <DIV>), an unquoted attribute, or stray < & characters in text. Namespaces must be declared before use.

Does it validate against a DTD or schema?

No — it checks well-formedness only (syntax correctness). Schema validation is a separate step; most feeds and APIs only require well-formed XML.

Will my attributes be reordered?

No — attribute order is preserved exactly as written, since some naive parsers and diff tools care about it.