Free tool
CSS selector extractor for HTML
A CSS selector extractor: paste HTML, type a selector like h2.title or a[href], and get the text, or an attribute such as href, of every matching element.
The example is loaded. Paste your own list to replace it.
→ 2 lines
CSS selector
Attribute to take (empty = the text)
Take
Skip empty values
Your text
Result
What it does
Paste HTML and get the text or an attribute (like href) of every element that matches a CSS selector.
Settings you can change
- CSS selector
- Attribute to take (empty = the text)
- Take: Every match, The first match
- Skip empty values
When to use it
You saved a page's HTML and want every product link. Use the selector a.product-link and the attribute href.
Example: CSS selector extractor
Settings used: CSS selector: a.item; Attribute to take (empty = the text): href.
Input
Result
Tips
- Leave the attribute empty to get the text. Type html to get the inner HTML.
- Then use Make links absolute to turn /lamp into a full link.
Often used with
One row per item (such as each product card), one column per selector. Tab-separated, so it pastes into a spreadsheet.
Turn /item/12 into https://example.com/item/12 using the page address you give.
Turn HTML into plain text.
Your text stays on this computer
Got your list from a web page?
HeyScraper turns the page you’re on into a spreadsheet, so you can skip the copying and pasting. Free: 500 pages a month.
Get HeyScraper