HTML Formatter & Minifier

Beautify messy HTML or minify it for production.

DeveloperFreeNo sign-up
Loading tool…

Runs entirely in your browser — nothing you enter is uploaded or stored on a server.

How to use it

Beautify HTML — block elements on their own lines and indented, short inline content kept on one line, script and style re-indented, <pre> untouched — or minify it by collapsing whitespace and dropping comments.

  1. Paste HTML.
  2. Choose beautify or minify, and the indent.
  3. Copy the result.
DevelopersEmail marketersDesigners

Questions

Will minifying change how my page looks?

It removes whitespace between block elements and collapses runs of spaces, which browsers ignore anyway. Text inside <pre> keeps every space.