Free CSS Developer Tool

Calculate CSSSelector Specificity

Enter any CSS selectors and instantly see their (a,b,c) specificity scores. Compare multiple selectors side-by-side and understand exactly which style rule wins in a cascade conflict.

Real-Time Calculation

Specificity scores update instantly as you type — no button click required.

📊

Visual Comparison

Color-coded bars show ID, class, and element contributions at a glance.

🔍

Explain Mode

See exactly which parts of your selector contribute to each score component.

CSS Specificity Calculator

Enter one or more CSS selectors. Scores update in real-time.

Try:
1.
(–,–,–)
ID selectors (#id)
Class / Attr / Pseudo-class (.cls, [attr], :hover)
Elements / Pseudo-elements (div, ::before)

Quick Reference

#id(1,0,0)
.class / [attr] / :pseudo-class(0,1,0)
element / ::pseudo-element(0,0,1)
* (universal)(0,0,0)
style="..." (inline)(1,0,0,0)

Frequently Asked Questions

Everything you need to know about CSS Specificity Calculator.