Home / Developer Tools / HTML Formatter and Minifier
Free online tool

HTML Formatter and Minifier

Format HTML with 2-space, 4-space or tab indentation. Conservative minification keeps comments and whitespace; code stays in your browser.

Start using

HTML Formatter and Minifier

Format HTML with 2-space, 4-space or tab indentation. Conservative minification keeps comments and whitespace; code stays in your browser.

Formatting uses syntax parsers in a cancellable background worker and does not execute pasted code. Quoted text is preserved. Maximum input: 500000 characters; maximum output: 4000000 characters. Processing stops after 5 seconds; excessive nesting and unsupported syntax produce an error. Review and test the result before using it.

Processing takes place locally in your browser.