CSS Selector Tester
Paste some HTML and a CSS selector to instantly see every element the selector matches, with the count and each matched element's markup. Uses the browser's own selector engine, so the results are identical to document.querySelectorAll — great for debugging scrapers, stylesheets and test selectors. Invalid selectors are flagged. Everything runs locally in your browser — nothing is uploaded.
How to use
- Paste your HTML into the first box.
- Type a CSS selector (for example li.item or a[href^="https"]).
- See the match count and each matching element; copy them if needed.
Frequently asked questions
- Which selectors are supported?
- Any selector your browser supports via querySelectorAll, including combinators, attribute selectors, :not(), :nth-child() and more. Pseudo-elements like ::before match nothing, as in the DOM.
- Are the results accurate?
- Yes. The HTML is parsed into a real document and queried with the browser's native selector engine, so matches are exactly what querySelectorAll would return on that markup.
- What if my selector is invalid?
- The selector field is highlighted and an error message is shown, instead of returning misleading results.
- Is my HTML sent anywhere?
- No. Parsing and matching happen entirely in your browser; nothing is uploaded.
Related tools
CSS Specificity Calculator
Paste any CSS selector to see its (ID, class, type) specificity, per-token breakdown, and head-to-head comparison with another selector.
HTML / CSS / JS Minifier
Strip whitespace and comments from HTML, CSS, or JavaScript — see the size saved and copy the result.
Color Name Finder
Find the closest CSS, Tailwind, or XKCD-survey color name for any hex/RGB input — ranked by perceptual distance in OKLab color space.
Regex Tester
Test JavaScript regular expressions live with highlighted matches and replace preview.
Glob Pattern Tester
Test file paths against a glob pattern (*, **, ?, [...], {a,b}) in your browser.
CSS Named Colors
All 147 CSS / X11 named colors with HEX, RGB, and a live swatch — searchable and grouped by hue.