XML Formatter

Pretty-print and validate XML with readable indentation.

Private by design. Every tool runs 100% in your browser — your code, text, and tokens never leave your device. Nothing is uploaded or stored.
Formatted XML

Result appears here.

Frequently Asked Questions

Why does my XML refuse to format?

Usually unescaped & or < inside text, or mismatched tags. The formatter surfaces the error location so you can escape or repair it.

Does indentation change XML parsing?

Only inside mixed-content text nodes. Element-only XML is unaffected; the formatter preserves significant whitespace.

Is my XML validated?

It is formatted, not schema-validated. Well-formedness errors are caught; semantic validation still needs an XSD.