CSS Specificity Calculator
Compute the specificity (a, b, c) of a CSS selector — IDs, classes/attributes/pseudo-classes, elements. Useful to understand why your rule is not applying. Everything in your browser.
Calculate a CSS selector's specificity
When a CSS rule simply won't apply, specificity is usually the one to blame. It's the point system that decides which selector wins when two compete for the same element. Paste a selector here and you get its specificity laid out clearly.
The value shows up split across the three levels that count: IDs first, then classes, attributes and pseudo-classes, and finally elements and pseudo-elements. With that breakdown in front of you, it becomes obvious why a #id beats ten classes, or why your rule keeps getting overridden. Writing more predictable CSS follows naturally from there.
Because the calculation happens inside your browser, you just paste the selector to see its weight. A handy companion when you're chasing down style conflicts.
Frequently asked questions
What do the three numbers in the result mean?
Why do :not() and :is() add nothing here?
Can I paste a comma-separated selector list?
Related Tools
PX to REM and EM Converter
Type a pixel, rem or em value and the other two update live from your root font size, 16px by default, plus a table from 8 to 96 px in pt too.
CSS Unit Converter
Convert between px, em, rem, %, pt, vh, vw for common design values — configurable 16 px base. Everything in your browser.
Mesh Gradient Generator
Create modern mesh gradients by combining multiple radial-gradients. Add, remove and drag points to compose vibrant backgrounds Stripe/Linear style. Everything in your browser.
Tailwind Config CLI Generator
Generate a ready-to-use tailwind.config.js for the Tailwind CLI, with content paths and theme set up. Copy it and start styling in seconds.
CSS Neumorphism Generator
Create Soft UI (neumorphism) effects with two complementary box-shadows. Adjust base color, distance, blur and type (raised, flat, pressed). Copy ready CSS. Everything in your browser.
CSS Gradient Generator
Create linear and radial CSS gradients with real-time preview. Adjust colors, positions and angle. Copy the CSS code with one click.