Compute and compare CSS selector specificity (A, B, C) scores instantly.
How specificity is counted
A ID selectors (#id) · B classes (.class), attributes ([attr]) and pseudo-classes (:hover) · C element types (div) and pseudo-elements (::before). Compared left to right: (1,0,0) beats (0,10,10). The universal selector * and combinators add nothing. :is(), :not() and :has() take the specificity of their most specific argument, while :where() always counts as zero.
Calculate the specificity of CSS selectors and understand why one rule overrides another. Paste one or more selectors to get their (A, B, C) specificity scores — IDs, classes/attributes/pseudo-classes, and element types — shown in a ranked comparison table with visual weight bars. Correctly handles :is(), :not(), :has() and :where(), comma-separated selector lists, and pseudo-elements. Runs entirely in your browser.
The CSS Specificity Calculator instantly breaks down and compares selector weights using standard (A, B, C) scoring to help developers debug overriding issues. It handles complex modern pseudo-classes like :is(), :not(), and :has() alongside traditional selectors. Running entirely client-side in the browser, it requires no installation or registration.
Good to know: This tool focuses strictly on calculating specificity scores rather than linting entire stylesheets or generating CSS code.
Calculate and compare CSS selector specificity scores instantly to understand why rules override each other.
Open the CSS Specificity Calculator
Navigate to the CSS Specificity Calculator tool in your web browser.
Paste your CSS selectors
Enter one or more CSS selectors, including comma-separated selector lists, into the input field.
Review specificity scores
View the calculated (A, B, C) specificity scores breaking down IDs, classes, attributes, pseudo-classes, and element types.
Compare rules and debug
Analyze the ranked comparison table with visual weight bars to determine why one CSS rule overrides another.
Estimated time: PT1M
Share this tool
Beautify, minify, and validate JSON data instantly.
Encode and decode Base64 strings instantly.
Generate v4 UUIDs instantly, single or in bulk.
Explain any code in plain language — all languages supported.
Percent-encode or decode URL strings instantly.
Encode/decode HTML entities like < > &.
Convert text or Markdown to a Word .docx file with live preview, RTL, and page-setup options.
Draw a Secret Santa with exclusions and share a private reveal link for each person.
Make custom bingo cards from your own words — play, print, or share a link.
Convert images to video with the Ken Burns zoom/pan effect. Add music and export as WebM.
Load and compare multiple URLs side by side in resizable iframes.
Rank anything with quick 1-v-1 matchups → a full ordered list you can share.
Convert Markdown to a fully customized, RTL-ready PDF.
See your public IP address plus full location, ISP, ASN, timezone, coordinates, and more.