Free tool
Remove HTML elements by CSS selector
Remove HTML elements that match a CSS selector, such as script, style, nav or .ad, and keep the rest of the HTML as it was.
The example is loaded. Paste your own list to replace it.
→ 1 line
CSS selector
Your text
Result
What it does
Delete every element that matches a CSS selector, such as scripts, ads or navigation, and keep the rest of the HTML.
Settings you can change
- CSS selector
When to use it
Clean saved HTML before you extract text from it, so menus and footers don't end up in your data.
Example: remove HTML elements
Settings used: CSS selector: nav, script, footer.
Input
Result
Often used with
Turn HTML into plain text.
Paste HTML and get the text or an attribute (like href) of every element that matches a CSS selector.
Indent HTML so every tag sits on its own line and nesting is easy to see (prettify).
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