Private, browser-local utility

CSS Specificity Calculator

Calculate and compare CSS selector specificity with modern functional pseudo-class rules.

Selectors stay in this browser tab.

Loading local tool…

Specificity model and parser limits

The score is the selector tuple (A, B, C): IDs; classes, attributes, and pseudo-classes; then type selectors and pseudo-elements. Inline declarations are outside this tool. :where() contributes zero. :is(), :not(), and :has() contribute their strongest argument. :nth-child(... of ...) adds its pseudo-class point plus the strongest selector after of.

A bounded tokenizer tracks strings, escapes, brackets, nested parentheses, selector lists, combinators, and functional pseudo-classes. It accepts at most 100 selectors and 10,000 characters. Malformed or unsupported tokens stop analysis. Cascade layers, origins, importance, source order outside equal-list display, nesting resolution, and actual DOM matching remain outside the result.