HTML Formatter & Beautifier

Format and beautify HTML code with customizable options.

How to Use HTML Formatter:

  • Paste your HTML code into the "HTML Input" box.
  • Select formatting options:
    • Indentation: Choose between Spaces or Tabs.
    • Size: Select the number of spaces (2, 4, or 8) if using spaces.
    • One attribute per line: If checked, each HTML tag attribute will be placed on a new line.
    • Remove comments: If checked, all `` comments will be removed.
    • Remove redundant whitespace: If checked, extra spaces and spaces between tags will be reduced.
  • Click "Format HTML". The formatted code will appear in the "Formatted Output" box.
Formatted HTML will appear here.
Attributes
Comments
Whitespace