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
Remove HTML elements

→ 1 line

CSS selector

Your text

1 line

Result

1 line

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).

All free tools

Your text stays on this computer
The list editor works on your computer. The text you paste or open is not uploaded or stored by HeyScraper, and closing the page clears it. Saved recipes are kept in this browser only.

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