Analysis updated 2026-07-18 · repo last pushed 2016-12-03
Shrink a bloated CSS framework like Bootstrap from 140KB down to roughly 35KB by removing unused styles.
Speed up website load times without manually auditing every stylesheet by hand.
Plug into a Grunt, Gulp, or webpack build pipeline to automatically trim CSS on every build.
| akarshsatija/purifycss | 3rd-eden/ircb.io | a15n/a15n | |
|---|---|---|---|
| Language | JavaScript | JavaScript | JavaScript |
| Last pushed | 2016-12-03 | 2016-11-16 | 2019-04-07 |
| Maintenance | Dormant | Dormant | Dormant |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | developer | developer | general |
Figures from each repo's GitHub metadata at analysis time.
The CLI version doesn't support file glob patterns, so you must list files explicitly.
PurifyCSS helps you shrink your website's CSS files by removing styles you're not actually using. If you've ever included a CSS framework like Bootstrap, you know that you typically use only a fraction of what it offers, the rest just adds unnecessary weight to your site. This tool looks at your HTML and JavaScript, figures out which CSS classes are actually being referenced, and throws away everything else. The tool works by scanning your project files for class names. It reads through your HTML, JavaScript, PHP, or templates, collects every CSS selector it finds, and then filters your CSS files to keep only the matching rules. It's smart enough to catch classes that are constructed dynamically in JavaScript, for example, if you join string fragments together or use a library like React's classNames to conditionally apply styles. You can use it as a standalone command-line tool, a JavaScript function in your build scripts, or through plugins for popular build tools like Grunt, Gulp, and webpack. This is useful for developers and teams building websites who want faster load times without manually auditing their stylesheets. A concrete example from the README: a Bootstrap CSS file starts around 140KB. Even after standard minification it's still 117KB. But if you run it through this tool first, then minify, you can get it down to roughly 35KB, because you're only keeping the 40% of styles your app actually references. A couple of things worth noting: the tool doesn't modify your original CSS files, so it's safe to experiment with. You write the trimmed output to a new file. You can also whitelist specific selectors if you want to guarantee they survive the cut, useful for classes added dynamically by third-party code that the scanner might miss. The command-line version has one limitation: it doesn't support file pattern matching (like *.js), so you need to list files explicitly when using it that way.
A tool that scans your HTML and JavaScript, finds which CSS classes you actually use, and strips out everything else to shrink your stylesheet file size.
Mainly JavaScript. The stack also includes JavaScript, Node.js.
Dormant — no commits in 2+ years (last push 2016-12-03).
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.