HTML Formatter
Beautify HTML with consistent indentation inside the browser.
Your input is processed locally in this browser tab.
How to use HTML Formatter
HTML language and Beautify mode are selected by default.
Choose 2-space, 4-space, or Tab indentation and paste or open an HTML file.
Review the byte comparison and copy or download the indented HTML.
Frequently asked questions
Are inline scripts, styles, and void tags preserved?
Yes. Self-closing void tags (<img/>, <meta>, <br>) and inline blocks are indented consistently without breaking tags.
Can I switch directly to Minify or CSS?
Yes. Use the Language and Operation toggle bars at the top of the workspace.