# HTML Formatter > Format messy HTML with 2 spaces, 4 spaces or a tab, or minify it. The structure check flags unclosed tags, crossed nesting, duplicate IDs and images without alt text. Free, in your browser, nothing is uploaded. ## What it does - Formats HTML with 2 spaces, 4 spaces or a tab, or minifies it for production. - Checks the structure: crossed nesting, unclosed tags, stray end tags, duplicate IDs, images without alt text, missing lang and title, unclosed quotes, comments and tags. - Shows a tag outline (element tree with line numbers) and byte/line counts before and after. - Opens .html files up to 2 MB. Input is read as text only: it is never rendered, never uploaded, never saved. - Formats live while typing for inputs under 300,000 characters; longer inputs wait for the Format button. - Limits: 2,000,000 characters, 256 levels of nesting. ## What formatting changes - Whitespace, line breaks and indentation only. - The content of script, style, pre and textarea is copied character for character. - End tags HTML lets you leave out (li, p, dt, dd, tr, td, th, option and similar) are written out, so the output shows the structure a browser builds. - Minify removes whitespace between block tags and comments (unless keep comments is ticked), and collapses repeated spaces in text. Conditional comments are kept. ## Errors it catches - Crossed nesting: `` closes `
` are still open. - Unclosed element: `
x
` never closes `x