Free tool

Remove Lines Containing Text

Type a word, a phrase or a regular expression and remove (or keep) every line that contains it.

Options

Characters: 0 · Lines: 0

Characters: 0 · Lines: 0

Everything is processed in your browser. What you type is not sent to any server or stored.

How it works and what it does with your text

It's a small, straightforward utility: you paste, choose options and copy the result.

It runs in your browser

The text is transformed by this page's code, on your device. No sign-up or installation needed.

We don't store what you type

We don't send your text to any server or store it. You can check this in the Network tab of your browser's developer tools.

Free and unlimited

Use it as often as you like. It works the same on mobile and on desktop.

Tips to get the most out of it

Filter logs and listings

It's useful for cleaning an error log, a list of URLs or an exported listing: remove everything that contains “test”, “staging” or “noindex”, for example.

Keeping is the opposite of removing

With “Keep only those” you get just the lines that match: like a “contains” filter in a spreadsheet.

Regular expressions without fear

Tick the option and try simple patterns: ^abc (starts with abc), xyz$ (ends with xyz), a|b (contains a or b), \d+ (contains a number).

Watch out for case

By default, uppercase and lowercase are not distinguished. If you need “URL” and “url” to be different things, tick the box.

Frequently asked questions

How do I remove the lines that contain a word?

Paste the list, type the word in “Text to search for”, keep “Remove them” and copy the result.

Can I remove the lines that do NOT contain a text?

Yes: choose “Keep only those”. It's the same as removing every line that doesn't contain the text you entered.

What happens if my regular expression is wrong?

The tool shows you a message and leaves the text as it is. Check parentheses, square brackets and backslashes.

Does it distinguish accents?

Yes: “cafe” and “café” are different texts. If you need to ignore them, remove them first with the accent removal tool.

Do you manage lists, texts or keywords at scale?

We help with SEO strategy and with custom tools that save you hours of manual work. Tell us what you do today.

No spam. No sales calls. Just your personalised reply.