What the formatter changes — and what it leaves alone
Block elements (div, section, ul, table…) each get their own line, indented one level deeper than their parent. Inline elements (a, strong, span, img) stay inside the line of text they belong to, so sentences are not chopped up. The contents of <pre> and <textarea> are left exactly as they were, because whitespace there is visible; <script> and <style> blocks are re-indented as a whole but not rewritten.
Formatting does not change how the page looks
Browsers collapse runs of whitespace between tags, so adding line breaks and indentation is invisible on the rendered page in almost every case. The exception is inline-block layouts, where a line break between two elements becomes a small gap — if that happens, the original was relying on the absence of whitespace.
When to format
- Before editing HTML you copied from "View source" or a template export.
- When reviewing what an AI assistant wrote, so you can see the structure at a glance.
- When a validator or browser error gives a line number — after formatting, line numbers point somewhere useful.
To see the result rendered, send it to the HTML viewer; to share it, publish it as a URL.