Skip to main content

HTML Formatter

Automatically format and indent HTML code for readability. Switch between 2/4 spaces and tabs, or minify to a single line.

Indent:
Share this tool
📖

How to Use

Step 1

Enter HTML

Enter HTML

Enter HTML code

Step 2

Format

Format

Indentation is auto-formatted

Step 3

Copy

Copy

Copy formatted HTML

Features

Indent Settings

Indent with 2/4 spaces or tabs

Syntax Highlighting

Highlight HTML syntax

Minify & Beautify

Both beautify and minify supported

FAQ

Choose from 2 spaces, 4 spaces, or tabs.