Skip to content
Ovatly

HTML Formatter

100% PrivateDeveloper Tools

Beautify messy HTML into clean, indented code, or minify it back down for production.

Runs entirely in your browser. Your input is not uploaded to Ovatly or anywhere else.

  1. 1Paste your HTML into the input box.
  2. 2Choose an indent size of 2 or 4 spaces if you plan to format.
  3. 3Press Format HTML to beautify it, or Minify HTML to compress it.
  4. 4Copy the result or download it as a text file.

About this tool

The HTML Formatter tidies messy markup into clean, indented code you can actually read, and can also minify HTML by removing comments and the whitespace between tags. It is the tool you reach for after viewing page source, copying an email template, or inheriting markup that was generated by something else.

Related tools

Advertisement

Part of Ovatly's free tools in Developer Tools.