HTML Formatter & Minifier
Beautify messy HTML or minify it for production. Free, no sign-up, your code stays on your device.
🔒 100% private — processing happens in your browser. Nothing is uploaded.
How to use the HTML formatter
- Paste HTML — a whole page, an e-mail template or a snippet.
- Click Beautify to indent every block element, or Minify to strip whitespace and comments.
- Copy the result or download it. For CSS and JavaScript files use our CSS/JS Minifier.
Readable HTML is easier to debug and review; minified HTML loads faster. Content inside <pre> and <textarea> keeps its exact spacing, inline tags like <b> and <a> stay on the same line as their text, scripts and styles are re-indented (and lightly minified when you minify). Conditional comments for Outlook e-mails are kept.