Why a careful formatter matters
In XML, whitespace inside text is data. <p>Total: <b>12</b> items</p> contains a space after the closing </b>; a formatter that puts each element on its own line silently turns that into a newline and indentation. Readers see different text, signatures break, and diffs light up.
BeautifyXML only re-indents regions it can prove are element-only: children separated by whitespace that already contains a line break. Everything else — mixed content, text-only elements, xml:space="preserve" subtrees and same-line spaces between siblings — is copied byte-for-byte and highlighted with amber hatching in the preview, with a note explaining why it was left alone.
Every result is checked before you can apply it
After formatting, the output is parsed again and compared with your source: same elements, same expanded names, same attribute values, same text in the same order. If anything differs, the result is withheld instead of offered. The source in the editor never changes until you choose Apply, and Undo restores it.
Your XML stays on your device. Parsing, formatting, diffing and conversion run in your browser (in a Web Worker for the heavy parts). Drafts are saved to this browser’s IndexedDB unless you switch on private mode.
Questions
Does BeautifyXML upload my XML?
No. There is no server-side processing. The page loads once and all parsing, formatting and conversion happens in your browser. Drafts are stored only in this browser’s IndexedDB, and private mode turns that off.
Why did part of my document stay on one line?
That region contains mixed content (text next to elements), is under xml:space="preserve", or has same-line whitespace between siblings. Adding line breaks there would change the text. The Preview marks these regions and the Findings tab lists each one with its reason.
Will formatting break an XML signature?
It can. Any change to bytes covered by a signature — whitespace, attribute order, quotes, empty-element style — can invalidate it. BeautifyXML warns when a ds:Signature is present and never claims a signature is still valid.
Are entities expanded or DTDs loaded?
Never. Only the five predefined entities and numeric character references are decoded for comparison. External entities and DTDs are shown but not fetched, and recursive or explosive entity declarations are reported as errors.