Format and beautify HTML
Paste minified or messy HTML and get neatly indented markup that's easy to read, review and edit.
Settings
Color 1
Color 2
Angle (135°)
background: linear-gradient(135deg, #6366f1, #a855f7);
How to use the HTML Formatter tool
- 1Paste your HTML.
- 2Click Beautify HTML Code.
- 3Copy the formatted markup.
Good to know
- Code is processed in your browser and never uploaded.
- Nested tags are indented consistently.
Frequently asked questions
Does formatting change how the page looks?
No. Only whitespace between tags changes; the content and structure stay the same.
Can it fix broken HTML?
It indents what's there but doesn't repair missing or mismatched tags.
Can I minify HTML too?
Yes — use the JS / CSS / HTML Minifier.
Related tools
JS / CSS / HTML MinifierMinify JavaScript, CSS and HTML to shrink file size and speed up your site. Removes comments and whitespace safely, in your browser.JSON FormatterFormat, validate and minify JSON instantly. Paste JSON to pretty-print it with indentation or compress it. Free and private — nothing is uploaded.Box Shadow GeneratorCreate CSS box-shadow effects with live preview — adjust offset, blur, spread and colour, then copy the CSS. Free and in your browser.