CSS Selector Tester
Test a CSS selector against pasted HTML and inspect matching elements, text and attributes locally.
Start with your input
Edit the example or replace it with your own text.
Choose your options
These settings are optional. Keep the defaults to get started.
How to use CSS Selector Tester
- Paste the example or your own input.
- Choose the options that match your task.
- Run the tool, review the result, then copy or download it.
When to use CSS Selector Tester
Before writing a scraper or a browser assertion, test whether a selector matches the intended elements in a small HTML sample. Paste a fragment and enter a browser-supported CSS selector. The result includes the match count and a structured description of each matching element, with its tag, attributes and text content. Invalid selector syntax is reported as an error.
How to interpret the result
HTML is parsed in an inert template and is never inserted into the live page. Scripts do not run and referenced resources are not loaded. Browser parsing can repair malformed markup, so the tree can differ from the original string. Layout-dependent pseudo-classes, hover state, shadow DOM and external styles are not simulated. Matches are capped at one thousand to keep the result readable; narrow a broad selector before inspecting a larger sample.
Example input
<ul><li class="active" data-id="1">Ada</li><li>Grace</li></ul>
What should I check before using the output?
HTML is parsed in an inert template and is never inserted into the live page.
Is input uploaded?
Processing takes place in your browser. This tool does not send your input or selected files to a conversion API.