What the HTML formatter changes, and what it doesn't
Formatting only adds and removes whitespace between tags: each block element starts on its own line, indented by how deep it is. Text, attributes and the content of <pre> and <textarea> stay as they are, so the page looks the same before and after. Blank lines you left between sections are kept (up to two in a row), and <script> and <style> contents are indented too.
When to format HTML
- Reading the source of a page someone else built, or a minified template.
- Tidying HTML an AI assistant wrote before you edit it.
- Making a diff readable: format both versions the same way first.
HTML formatter FAQ
Will formatting change how my page looks?
Not for block elements. Between inline elements, like two links side by side, any whitespace shows as one space, and the formatter keeps inline elements on the same line where they were next to each other.
Does it fix broken HTML?
No: it indents what's there. To see how a browser reads it, open it in the HTML Viewer.
Which formatter does it use?
js-beautify, a widely used open-source formatter, running in your browser.
Is my HTML uploaded?
No. Formatting runs in your browser. It's sent to Lobsite only if you press Publish this page.