CSS Specificity Calculator Online Free
Enter CSS selectors (one per line) and compare specificity. No uploads.
How to Calculate CSS Specificity
Enter one CSS selector per line in the textarea above. Click Calculate Specificity. The tool computes the (a,b,c) specificity tuple for each selector and sorts them from highest to lowest.
Understanding the Specificity Tuple
Specificity is expressed as (a,b,c): a counts ID selectors, b counts class/attribute/pseudo-class selectors, c counts type/pseudo-element selectors. Inline styles have specificity (1,0,0,0) and !important overrides everything.
Free SEO Audit Tool checks page speed. SEO Audit Services provides full technical audits.
Frequently Asked Questions
How is CSS specificity calculated?
Specificity is calculated as a tuple (a,b,c) where a counts ID selectors, b counts class/attribute/pseudo-class selectors, and c counts type/pseudo-element selectors. Inline styles and !important override.
What does the specificity score mean?
Higher specificity wins when two rules target the same element. The tool shows (a,b,c) tuples so you can compare which rule applies.
Does !important affect specificity?
Yes. !important gives a rule the highest priority regardless of specificity. The tool flags !important usage.
Can I compare multiple selectors?
Yes. Enter one selector per line and the tool calculates specificity for each, sorted from highest to lowest.
Do you upload my CSS?
No. All calculation happens in your browser. Your CSS never leaves your device.
Is there a file size limit?
No. The tool runs entirely in your browser with no uploads.