Pretty-prints XML with readable indentation.
The XML Formatter takes messy or minified XML and pretty-prints it with clean two-space indentation, putting each element, comment, and the XML declaration on its own line. It's handy any time you need to read, review, or diff an XML payload that arrived as a single unreadable line. Everything runs in your browser, so even large documents are formatted instantly without leaving your machine.
No. Formatting happens entirely in your browser using client-side JavaScript, so your XML never leaves your device and nothing is sent to any server.
It uses two spaces per nesting level and a newline (\n) line separator, with each child element placed on its own line.
If the input can't be parsed as XML, the formatter throws an error that surfaces in the error banner. Some lenient cases, like an unclosed or mismatched tag, may be auto-corrected rather than rejected.
No. CDATA blocks are left exactly as written and entity references such as & are preserved unchanged; only indentation and line breaks are adjusted.
No. Formatting is idempotent, so feeding already-formatted output back in returns the same result.