Code Tools
Popular
Recently added
HTML Formatter
Pretty-print nested HTML for readability or minify it by removing comments and excess whitespace.
Features
- Beautify with indentation
- Minify HTML
- Comment removal on minify path
- One-click copy
How to use HTML Formatter
- 1Paste HTML.
- 2Choose Beautify or Minify.
- 3Copy the result.
Examples
Pretty print
Input<div><p>Hi</p></div>Output
<div> <p>Hi</p> </div>
About HTML Formatter
HTML Formatter beautifies and minifies HTML locally so you can clean snippets before pasting into templates or emails.
Frequently asked questions
No. It only reformats text.
Common void tags are handled; unusual custom elements may need a manual pass.
No.