HTML Prettifier & Minifier
Format, minify, and validate HTML in your browser. No data sent to servers.
Format
Minify
Validate
Indent
2 spaces
4 spaces
Tab
Options
Preserve inline elements
Lowercase tag names
Format
Sample
Clear
Input HTML
699 B
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Page</title> <!-- Styles --> <link rel="stylesheet" href="styles.css"> </head> <body> <header class="site-header"> <nav> <a href="/">Home</a> <a href="/about">About</a> <a href="/contact">Contact</a> </nav> </header> <main> <h1>Hello, World!</h1> <p>This is a <strong>sample</strong> HTML document with <em>inline</em> elements.</p> <ul> <li>Item one</li> <li>Item two</li> <li>Item three</li> </ul> </main> <footer> <p>© 2024 My Site</p> </footer> </body> </html>
Paste HTML above and click
Format
to see results.