🚫 Keyword · Regex · Case-insensitive

Remove Lines
Containing

Delete every line that contains a specific word, phrase or regex pattern. Or invert it — keep only lines that match. Instant results.

🚫 Remove matching lines ✅ Keep only matching lines
Case insensitive Use regex Whole word only
Input text
Result

Free Remove Lines Containing Keyword Tool

This tool filters text line by line, removing (or keeping) every line that contains your specified keyword, phrase or regex pattern. It's the browser equivalent of the Unix grep -v command — filter out unwanted lines from a list, log file, or data export in seconds.

Common use cases

Removing error lines from a log file export. Filtering out comment lines that start with # from a config file. Deleting blank keyword entries from a list. Removing lines that contain certain domains from a URL list. Keeping only lines that match a specific pattern (use "Keep only matching lines" mode). Extracting lines that contain email addresses, URLs or numbers from mixed text.

Using regex for advanced filtering

Enable "Use regex" to unlock pattern-based filtering. For example: ^\d matches lines starting with a number, https?:// matches lines with URLs, (error|warning|critical) matches lines with any of three keywords.

FAQ

Can I filter by multiple keywords at once?
Yes — enable "Use regex" and use the pipe character: error|warning|critical will match lines containing any of those three words.
What does "Keep only matching lines" do?
It inverts the operation — instead of removing lines that contain the keyword, it removes lines that don't contain it. Equivalent to grep without the -v flag.

Other Free Text Tools