HTML Formatter

HTML Formatter beautifies minified or uneven HTML with consistent indentation and readable line breaks. It supports full HTML documents and fragments, including embedded JavaScript and CSS inside script and style elements.

Choose tabs or spaces, set a preferred line width, control HTML attribute wrapping, and decide how embedded script and style content should be indented. The formatter preserves template-friendly HTML and can keep existing newlines when they carry useful structure.

Use Preview to inspect the rendered structure without leaving the page. Preview scripts, forms, event handlers, and external resources are disabled for safety. Formatting, previewing, copying, and saving all run locally in your browser.