Pretty print HTML without fighting the markup
Minified templates, scraped pages, and email HTML are painful to read. An HTML beautifier restores structure: each block tag on its own line, children indented, phrasing content such as <strong> and <a> kept with the surrounding text so you do not lose word spacing.
That is the same idea as an HTML pretty printer or tidy: the document should look the same in a browser, just easier for humans and diffs.
What gets indented
Block structure (html, body, div, ul, table, headings, and similar) is nested. Void tags such as img, br, and meta stay empty. Comments and doctype declarations keep their place at the top of the tree.
Inside <script>, <style>, <pre>, and <textarea> the original text is left alone. Beautifying CSS or JS in those bodies would risk breaking strings and already-minified bundles.
<p>Hello <strong>world</strong>.</p>
<ul>
<li>One</li>
<li>Two</li>
</ul>
Beautify vs minify
- Beautify HTML — indent, wrap long attribute lists if you turn that option on, keep inline runs on one line.
- Minify HTML — strip extra whitespace between tags. Use this when you want a smaller snippet, not when you still need to edit the file.
Keyboard shortcut: Ctrl+Enter or Cmd+Enter runs Beautify. Tab inserts the current indent.