Remove Lines Containing Text
Remove every line in a text block that contains a given word, or keep only the lines that match, with case and whole-word options.
🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.
Text & Writing
Remove Lines Containing Text
Frontend preview — no upload or external service.
Filtered output
1,840 lines in, 1,612 out — 228 lines containing "DEBUG" removed, with case-insensitive matching on.
How the Remove Lines Containing Text works
- Paste the lines, or the log file contents.
- Enter the word or pattern to match on.
- Choose whether to remove or keep the matches, and check the counts before copying the result out.
FAQ
Does it support regular expressions?
Plain substring matching covers most cases and avoids the surprises regex brings. For pattern matching beyond a literal word, a regex-capable editor or grep is the better tool.
Why did it remove more lines than expected?
Substring matching finds the word inside longer words too. Enabling whole-word matching stops "error" from matching "errors" and "terror".
Is my text uploaded?
No. Filtering happens in the page, which matters when the text is a log file containing internal hostnames or user data.
How we compare
| Feature | Online Tool Store | A word processor | A paid writing assistant |
|---|---|---|---|
| Remove or keep modes | ✓ | One at a time | ✓ |
| Line counts before and after | ✓ | ✗ | Sometimes |
| Text stays local | ✓ | ✓ | ✗ |
| No command line | ✓ | ✗ | ✓ |
Remove Lines Containing Text is the browser version of a grep one-liner, for the times you have the log open and not a terminal.