CSS Selector Tester
Developer
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
Base64 to Hex Converter (and back)
Convert a Base64 string to hexadecimal bytes and hex back to Base64, with URL-safe support, in your browser.
Quoted-Printable Encoder & Decoder
Encode text to MIME Quoted-Printable (RFC 2045) or decode it back — handling =XX escapes, soft line breaks, and UTF-8 — entirely in your browser, with 76-character line wrapping on encode.
Hash Generator (SHA)
Generate SHA-1, SHA-256, SHA-384, and SHA-512 hashes from text.
URL Encoder / Decoder
Percent-encode text for URLs, or decode encoded URLs back to text.
Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text, instantly.
JSON Formatter & Validator
Format, beautify, minify, and validate JSON right in your browser.