CSS Specificity Calculator

Calculate specificity tuples for bounded selector text.

Scope: Supports a deterministic selector subset; argument-bearing functional pseudo-classes are rejected rather than approximated. It is not a complete CSS parser or cascade analysis.

Workbench

Inputs stay on this page.

How to use CSS Specificity Calculator

  1. Enter the one css selector.

    • Deterministic selector subset; selector lists, namespaces, escapes, and all functional pseudo-classes are rejected.
  2. Press “Calculate specificity”.

  3. Copy the result, or download it as css-specificity.json.