CSS Selector Specificity Calculator

Instantly calculate the specificity (A-B-C) of any CSS selector

도구를 불러오는 중…

🔒 Everything runs 100% in your browser. Your files and input are never uploaded to any server.

Enter a CSS selector and this tool automatically breaks it down into ID count (A), class/attribute/pseudo-class count (B), and tag/pseudo-element count (C) to show its specificity score. It's handy for front-end developers debugging why a style isn't applying or which rule wins, and everything runs locally in your browser with nothing sent to a server.

How to use

  1. Type the CSS selector you want to analyze into the input field (e.g. div.content > p::first-line)
  2. Check the automatically calculated A (IDs), B (classes/attributes/pseudo-classes), and C (tags/pseudo-elements) values
  3. Review the final specificity score in A-B-C format
  4. Scroll through the extracted components list to see exactly how each part of the selector was counted

FAQ

How is the specificity score compared between selectors?
It's compared column by column: A first, then B, then C. A higher A always wins regardless of B or C, and so on.
Does it handle :not(), :is(), and :has()?
Yes, these functional pseudo-classes are calculated using the highest-specificity selector found inside their parentheses. :where() is an exception and contributes zero specificity.
Is my selector sent to a server?
No, all parsing and calculation happens locally in JavaScript in your browser — nothing is transmitted anywhere.

← Back to all tools

가격 보기카톡 무료 상담