CSS specificity calculator
Compare the specificity of CSS selectors.
Bookmark this page
Keep this page handy for next time.
- On a computer
- Press Ctrl + D, or Command + D on a Mac.
- On a phone or tablet
- Open your browser's menu or Share menu and look for Add Bookmark, Bookmark or Add to favourites.
A bookmark saves the page link. Save any tool results separately.
How to use this tool
- Compare the specificity of CSS selectors.
- Adjust the labelled settings, then run the tool. Copy the result or download it as a file.
Things to know
- Processing is local. Supplied code and network requests are never executed. Input and text settings are limited to 5 MiB combined; text settings alone are limited to 1 MiB.
- Specificity is only one part of the cascade; origin, layers, importance and source order also matter.
- At most 1,000 selectors within 512 KiB. Each selector: 2,048 characters, eight nesting levels and 512 tokens. The CSV retains every selector and specificity component.
You might also need
More in web developmentCSS selector tester
Find matching elements in pasted HTML without rendering the supplied page.
CSS formatter and minifier
Format or minify CSS without executing it.
Redirect rule generator
Generate permanent redirect rules from one source and destination pair per line.
Font size converter
Convert a pixel font size to REM and points instantly. Starts with a 16px root font size.
Semantic version range tester
Check which semantic versions satisfy a package version range.
Gitignore builder
Combine locally bundled ignore rules for a project.
Chmod calculator
Convert Unix permission modes into readable permissions and a ready-to-copy command.
CIDR range combiner
Combine overlapping or adjacent address ranges into the smallest equivalent CIDR list.
Content Security Policy builder
Build a policy from explicit directives and check common unsafe settings.