PurgeCSS
Unused CSS removal tool that scans HTML, templates and component source to detect which selectors are actually referenced, then drops dead styles from the final stylesheet, exposed through a CLI, JavaScript API and bundler plugins, commonly paired with utility frameworks to keep production CSS small.
PurgeCSS at purgecss.com is a free MIT unused CSS removal tool, npm 9.1.0 Node 22.12+, scans HTML templates and component source for referenced selectors, drops unreferenced style rules, CLI JS API and bundler plugins, paired with utility frameworks to shrink production CSS, content globs and safelist for dynamic classes, no sold commercial tier (data as of Nov 22, 2026).
*This is an affiliate link, we may earn a commission at no extra cost to you.
Is PurgeCSS free?
PurgeCSS: PurgeCSS is free open-source software released under the MIT License; the purgecss package latest 9.1.0 requires Node 22.12.0 or above. It removes unused CSS from stylesheets: the tool reads configured content files such as HTML pages, templates, JavaScript and component source, extracts the class, id and element selectors that appear there, and compares them against the rules in the stylesheet so declarations for selectors never referenced are dropped. It exposes a CLI, a JavaScript API and plugins for common bundlers, and it is frequently used alongside utility-first frameworks to keep only the classes generated for the current project. Content globs define which files are scanned, and safelists keep selectors that are applied dynamically and would otherwise be removed. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026). Check the official page for current status before relying on it.
Frequently Asked Questions
Is PurgeCSS free?
The code is free to self-host, but a hosted plan from the vendor may not be. PurgeCSS publishes its source, so cost depends on where you run it.
How much does PurgeCSS cost?
PurgeCSS is free open-source software released under the MIT License; the purgecss package latest 9.1.0 requires Node 22.12.0 or above. It removes unused CSS from stylesheets: the tool reads configured content files such as HTML pages, templates, JavaScript and component source, extracts the class, id and element selectors that appear there, and compares them against the rules in the stylesheet so declarations for selectors never referenced are dropped. It exposes a CLI, a JavaScript API and plugins for common bundlers, and it is frequently used alongside utility-first frameworks to keep only the classes generated for the current project. Content globs define which files are scanned, and safelists keep selectors that are applied dynamically and would otherwise be removed. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026). Usage volume, plan limits and add-ons can push the bill above the figures shown, so confirm the current numbers on the vendor page before committing.
Where can I check PurgeCSS's current pricing?
On PurgeCSS's official site, linked from this page. We only publish a price after reading the vendor's own pricing page, so if this page shows no number, it means no traceable public price is on file — not that the tool is free.
What is PurgeCSS?
Content globs list the files to inspect; selectors found in markup and code are kept, matching stylesheet rules survive while unmatched rules are removed, and a safelist preserves classes added at runtime; bundler plugins run the pass during production builds.
How does pricing work?
The tool installs free under MIT with no purchase fee or seat count; bundler plugins are community packages on their own terms, and commercial support would be outside the open-source project.
How does PurgeCSS compare with other tools in Dev Workflow & Productivity?
PurgeCSS is listed in the Dev Workflow & Productivity category, alongside 2 other tools we track here. 2 of those 2 peers have a dated price we read from the vendor's own pricing page, and the table below shows each tool's pricing model next to the exact rate on file — so the comparison is between published numbers, not between marketing pages.
| Tool | Pricing model | Key pricing on file | Price checked |
|---|---|---|---|
| PurgeCSS | Open source | PurgeCSS is free open-source software released under the MIT License; the purgecss package latest 9.1.0 requires Node 22.12.0 or above. It removes unused CSS from stylesheets: the tool reads configured content files such as HTML pages, templates, JavaScript and component source, extracts the class, id and element selectors that appear there, and compares them against the rules in the stylesheet so declarations for selectors never referenced are dropped. It exposes a CLI, a JavaScript API and plugins for common bundlers, and it is frequently used alongside utility-first frameworks to keep only the classes generated for the current project. Content globs define which files are scanned, and safelists keep selectors that are applied dynamically and would otherwise be removed. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026). | Nov 22, 2026 |
| Tailwind CSS | Open source | Tailwind CSS is free open-source software released under the MIT License; the tailwindcss package latest 4.3.5 is published to the npm registry. It is a utility-first CSS framework: instead of writing separate custom styles for each component, developers compose designs from low-level utility classes applied directly in markup, covering spacing, typography, colour, layout, flex and grid, borders and effects. The design system is configured through theme settings for colours, fonts, spacing and breakpoints; responsive variants, hover, focus and other pseudo-class states are applied through class prefixes, and plugins or custom utilities extend the set. The just-in-time generation step scans source files for used classes and emits only the styles that appear in the project, keeping production stylesheets small. The framework itself ships free; any commercial training, consultancy or template content offered by the maintainers would be separate from the open-source package (data as of Nov 22, 2026). | Nov 22, 2026 |
| cssnano | Open source | cssnano is free open-source software released under the MIT License; the cssnano package latest 9.9.0 requires Node ^22.22.3, ^24.15.0 or >=26.0. It is a CSS minimizer built on the PostCSS ecosystem: production stylesheets are parsed and a chain of internal transforms strips whitespace and comments, merges identical rules, shortens colours, lengths and other values, optimises selectors and rewrites declarations where safe. Presets control how aggressive the compression is, with a safe default that avoids risky rewrites and a more aggressive mode for controlled production builds. It can run as a PostCSS plugin inside bundler style pipelines or through its own CLI, and it pairs with source maps so compressed output can still be traced back to the original source. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026). | Nov 22, 2026 |
3 of these 3 entries carry a specific price we read from the vendor's site. Where the column says there is no dated price on file, we have not verified a rate — treat that as unknown rather than free, and check the vendor's page before you budget for it.
Full pricing breakdown
PurgeCSS's source code is publicly available, so you can run or build it yourself. The project may also sell a paid hosted or cloud plan — check the official site for current pricing.
Open source does not always mean every hosted version is free.
Key pricing: PurgeCSS is free open-source software released under the MIT License; the purgecss package latest 9.1.0 requires Node 22.12.0 or above. It removes unused CSS from stylesheets: the tool reads configured content files such as HTML pages, templates, JavaScript and component source, extracts the class, id and element selectors that appear there, and compares them against the rules in the stylesheet so declarations for selectors never referenced are dropped. It exposes a CLI, a JavaScript API and plugins for common bundlers, and it is frequently used alongside utility-first frameworks to keep only the classes generated for the current project. Content globs define which files are scanned, and safelists keep selectors that are applied dynamically and would otherwise be removed. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026).
Estimate your monthly bill with our calculator →Or build a full stack around your budget →Pricing Guides & Comparisons
Plan prices in these guides are read from each vendor's own pricing page, with the date we checked them.
⭐ Rate this tool
How would you rate this tool?
🚀 Never Miss a New AI Coding Tool
Join 1,000+ developers getting our weekly roundup: new AI tools, student free tiers, exclusive discounts, and side project deals. No spam, unsubscribe anytime.
Current Alternatives
Tailwind CSS
Utility-first CSS framework that builds designs directly from low-level utility classes in markup, with a configurable design system, responsive variants, pseudo-class states, component and plugin composition, and a fast just-in-time stylesheet generation step for production.
cssnano
PostCSS-based CSS minimizer that removes whitespace and comments, combines duplicate rules, shortens values and optimises selectors and declarations for production, with configurable presets that balance safe compression against aggressive rewrites, runnable as a PostCSS plugin or through its CLI.
Tool Information
- Official Websitepurgecss.com
- CategoryDev Workflow & Productivity
- PricingOpen Source
- Price checkedNov 22, 2026
