Parsel.js: CSS Selector Parser

JSON →
library 1.2.2 ·javascript
verified May 27, 2026

Parsel.js is a lightweight and permissive JavaScript library designed for parsing CSS selectors and calculating their specificity. It provides a robust Abstract Syntax Tree (AST) representation of selectors, enabling developers to analyze, manipulate, or traverse selector structures. The current stable version is 1.2.2, with releases occurring relatively frequently, including both patch and minor updates to address bugs and introduce new features like support for relative selector lists. Key differentiators include its minimal footprint and forgiving parsing logic, making it suitable for environments where strict CSS validation might be too restrictive. It also includes built-in functionality for computing the CSS specificity of any given selector.

total hits 16
actors 8 distinct systems
last hit 1d ago AhrefsBot
GPTBot
2
Script
1
ClaudeBot
1
MetaBot
1
Search engines
2
Humans
1

top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany · 🇪🇸 Spain