How to use it
- Paste your HTML, open an
.htmlfile, or start from the sample: a page squashed onto one line. - Choose 2 spaces, 4 spaces or tabs. The formatted HTML appears as you type.
- Copy it, download it, or press Publish this page to put it online.
What changes, and what 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 it helps
- 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.
Frequently asked questions
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.