CSS Specificity Calculator
Compare and rank the specificity of CSS selectors.
Selectors
One selector per line
Specificity results
#header
.nav a:hover
ul li.item
div > p::first-line
*
Ranked by specificity (highest first)
About the CSS Specificity Calculator
Paste multiple CSS selectors to compute their specificity score based on ID, class/attribute/pseudo-class, and element/pseudo-element counts, then see them ranked from highest to lowest specificity.
Examples
Selector list
#header
.nav a:hoverOutput
#header → (1,0,0)
.nav a:hover → (0,2,1)Keyboard shortcuts
- Copy the main outputCtrl / ⌘ + Shift + C
- Download the resultCtrl / ⌘ + S
- Share this toolCtrl / ⌘ + Shift + S
- Reset the inputsAlt + R
- Open the tool search paletteCtrl / ⌘ + K
Related tools
CSS Unit Converter
HTML & CSS
Convert between px, rem, em, %, pt, vw, and vh.
Font Pairing Preview
HTML & CSS
Preview heading and body font combinations live.
HTML Entity Cheatsheet
HTML & CSS
Searchable reference of common HTML character entities.
HTML Viewer with CSS & JS Tabs (Live Preview)
HTML & CSS
Edit HTML, CSS, and JS in tabs with an instant sandboxed live preview.
Tailwind Class to CSS
HTML & CSS
Translate common Tailwind utility classes into plain CSS.
Border Radius Generator
HTML & CSS
Fine-tune per-corner border radii visually.
Frequently asked questions
Version 1.0.0 · Updated 2026-08-09 · Runs entirely in your browser