Paste your HTML here
Purged CSS
Purge CSS tool helps you remove unused CSS rules from your stylesheets to reduce file size and improve website performance. This free online tool is ideal for developers who want to optimize CSS by keeping only the styles actually used in their HTML. Paste your CSS and HTML, and the tool will generate a cleaned, optimized CSS output.
<div class="container">
<div class="card">
<h1 class="title">Hello World</h1>
<p class="text">This is a sample.</p>
</div>
</div> .container {
max-width: 1200px;
margin: 0 auto;
}
.card {
background: white;
padding: 2rem;
}
.title {
font-size: 2rem;
color: #333;
}
.unused-class {
color: red;
display: none;
}
#unused-id {
background: blue;
} .container {
max-width: 1200px;
margin: 0 auto;
}
.card {
background: white;
padding: 2rem;
}
.title {
font-size: 2rem;
color: #333;
} Significantly reduce CSS file size by removing dead code.
Smaller files mean faster downloads and rendering for your users.
Need to format CSS? Use our CSS Formatter.
Need to compile SCSS? Use our SCSS Compiler.
Need to format HTML? Use our HTML Formatter.