tailwindcss-obfuscator weekly downloads statistics
By josedacosta · npm · Webpack plugins
Tailwind CSS class mangler & obfuscator — rename utility classes (bg-blue-500 → tw-a) at build time. Vite, Webpack, Rollup, esbuild, Next.js, Nuxt, SvelteKit, Astro, Solid, Qwik, React Router 7, TanStack Router. Tailwind v3 + v4. Cuts CSS bundle 30–60% an
tailwindcss-obfuscator has 386 recorded weekly downloads on npm, a decrease of 5.9% over the past 30 days, ranking #2322 of 3,247 tracked listings.
About tailwindcss-obfuscator
<br /><br />
<p align="center"> <a href="https://josedacosta.github.io/tailwindcss-obfuscator/"> <img src="https://raw.githubusercontent.com/josedacosta/tailwindcss-obfuscator/main/docs/public/images/tailwindcss-obfuscator/logo-horizontal.svg" alt="tailwindcss-obfuscator" width="500"> </a> </p> <br /> <h1 align="center">tailwindcss-obfuscator</h1> <p align="center"> <strong>Obfuscate, mangle and shrink Tailwind CSS class names at build time.</strong><br/> Cuts your CSS bundle by <strong>30–60%</strong> and protects your design system from copy-paste reverse-engineering.<br/> Vite · Webpack · Rollup · esbuild · Rspack · Farm · Next.js · Nuxt · SvelteKit · Astro · Solid · Qwik · React Router 7 · TanStack Router.<br/> Tailwind <strong>v3</strong> & <strong>v4</strong>. </p> <p align="center"> <a href="https://www.npmjs.com/package/tailwindcss-obfuscator"><img src="https://img.shields.io/npm/v/tailwindcss-obfuscator.svg?style=flat-square" alt="npm version"></a> <a href="https://www.npmjs.com/package/tailwindcss-obfuscator"><img src="https://img.shields.io/npm/dm/tailwindcss-obfuscator.svg?style=flat-square" alt="npm downloads"></a> <a href="https://github.com/josedacosta/tailwindcss-obfuscator/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/tailwindcss-obfuscator.svg?style=flat-square" alt="license"></a> <a href="https://josedacosta.github.io/tailwindcss-obfuscator/"><img src="https://img.shields.io/badge/docs-online-brightgreen?style=flat-square" alt="docs"></a> <a href="https://www.bestpractices.dev/projects/12705"><img src="https://www.bestpractices.dev/projects/12705/badge" alt="OpenSSF Best Practices"></a> <a href="https://scorecard.dev/viewer/?uri=github.com/josedacosta/tailwindcss-obfuscator"><img src="https://img.shields.io/ossf-scorecard/github.com/josedacosta/tailwindcss-obfuscator?style=flat-square&label=OpenSSF%20Scorecard" alt="OpenSSF Scorecard"></a> </p>📖 Full documentation
👉 josedacosta.github.io/tailwindcss-obfuscator
Setup guides for every framework, the complete options reference, the patterns that obfuscate (and the ones that don't), the comparison with
tailwindcss-mangle, and more.
Why
tailwindcss-obfuscator rewrites verbose Tailwind utility classes (bg-blue-500, flex) into short opaque identifiers (tw-a, tw-b) at build time. The shipped HTML / CSS / JS bundles get 30–60 % smaller on CSS-heavy pages and your design system becomes much harder to reverse-engineer. Source code stays readable.
Install
pnpm add -D tailwindcss-obfuscator
# or: npm install --save-dev tailwindcss-obfuscator
# or: yarn add --dev tailwindcss-obfuscator
You also need tailwindcss (v3 or v4) installed in the project.
Quick start — Vite
// vite.config.ts
import { defineConfig } from "vite";
import tailwindcss from "@tailwindcss/vite";
import tailwindCssObfuscator from "tailwindcss-obfuscator/vite";
export default defineConfig({
plugins: [tailwindcss(), tailwindCssObfuscator()],
});
That's it. Run vite build and your bundle is obfuscated. vite dev is left untouched so the dev experience stays normal.
For Webpack / Rollup / esbuild / Next.js / Nuxt / SvelteKit / Astro / Solid / Qwik / React Router 7 / TanStack Router setups, see the full documentation.
Plugin entry points
| Bundler / framework | Import path |
|---|---|
| Vite | tailwindcss-obfuscator/vite |
| Webpack | tailwindcss-obfuscator/webpack |
| Rollup | tailwindcss-obfuscator/rollup |
| esbuild | tailwindcss-obfuscator/esbuild |
| Nuxt module | tailwindcss-obfuscator/nuxt |
| CLI binary | tw-obfuscator (after install) |
| Internal pipeline | tailwindcss-obfuscator/internals |
Compatibility
The "Versions" column lists the design-intent range — the plugin core is bundler-agnostic and most modern versions of each tool work. The "Tested in CI" column lists the exact version exercised by an apps/test-* app on every release. If you need a guarantee for a specific version, open an issue and we'll add a test app.
| Dependency | Versions | Tested in CI |
|---|---|---|
| Tailwind CSS | v3.x · v4.x | v3.4 + v4.1 |
| Vite | v4 → v8 | v8.x |
| Webpack | v5 | v5.106 (standalone) + v5 in Next |
| Rollup | v3 → v4 | v4.60 |
| esbuild | ≥ 0.17 | ≥ 0.28 |
| Next.js | v13 → v16 | v16.2 (App Router + Turbopack) |
| Nuxt | v3 · v4 | v4.4 |
| SvelteKit | v2 | v2.58 (Svelte 5.55, runes) |
| Svelte | v4 · v5 | v5.55 (runes) |
| Astro | v4 → v6 | v6.1 |
| Vue | v3.5+ | v3.5.14 |
| Solid | v1.9+ | v1.9.12 |
| Qwik | v1.x | v1.19 |
| React Router | v7 (ex-Remix) | v7.14 |
| TanStack Start | v1.168+ | v1.168 |
| Node.js | ≥ 18 | 20 (CI) + 22 (CI) |
Full live matrix with the test app file paths : docs/reference/compatibility.
FAQ…
Description from the npm listing.
- tailwindcss
- tailwind
- tailwind-css
- obfuscator
- obfuscation
- mangle
- mangler
- tailwindcss-mangle
- tailwindcss-mangler
- tailwind-mangle
- tailwind-mangler
- tailwindcss-mangle-alternative
- class-mangler
- class-name-mangler
- css-class-mangler
- tailwind-class-mangler
- tailwind-class-shortener
- tailwind-css-mangler
- minify
- css
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (592)Similar npm Webpack plugins plugins
All 20 tailwindcss-obfuscator alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/tailwindcss-obfuscator. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.