Remove Lines Containing A Certain Word deletes every line that contains the word or text you type. Paste your text, enter the word and copy the result. It is free and runs in your browser.
Michael ran slow. Sam ran fast. Greg won the race.
Michael ran slow. Greg won the race.
Bookmark: press Ctrl+D (Windows) or Cmd+D (Mac) to save this tool.
This tool removes every line that contains the word or text you type and keeps all the other lines in their original order. A line is removed if the text appears anywhere in it.
The match works on any text, not only whole words, so sun also removes a line with sunny or sunset. By default capital letters do not matter. Tick Match case to match capitals exactly. Empty lines do not contain your text, so they stay.
Use it to take unwanted lines out of a log, a list of names, an export or any long text.
Each example shows the word used. Capitals are ignored unless Match case is on.
| Setting | Before | After |
|---|---|---|
| Word: Sam | Michael ran slow. Sam ran fast. Greg won the race. | Michael ran slow. Greg won the race. |
| Word: error | ok: saved error: disk full ok: sent error: timeout | ok: saved ok: sent |
| Not a whole word (sun) | sunny day sunset moon | moon |
| Match case off (default, cat) | Cat food cat toy dog bowl | dog bowl |
| Match case on (cat) | Cat food cat toy dog bowl | Cat food dog bowl |
| Empty lines stay (a) | b1 a2 b3 | b1 b3 |
Taking unwanted lines out of a log, a list of names or an export, and cleaning up a long text in one step.
The text matches inside words too, and spaces count, so cat also removes a line with category. Lines that match are deleted from the box. Use Undo right after if the result is not what you wanted.
To keep the matching lines instead, try Keep Lines Containing A Certain Word. To get rid of blank lines, try Remove Empty Lines.
It removes every line that contains the word or text you enter and keeps all the other lines in their original order.
Type or paste your text, enter the word in the Remove lines that contain box and click Remove Lines. The result replaces the text in the box. Click Copy to use it, or Undo to go back.
No. It matches the text anywhere in a line, so sun also removes a line with sunny or sunset.
Not by default, so Sun, SUN and sun all match. Tick Match case if you want capitals to match exactly.
You can search for a phrase, such as red car, and a line is removed if it contains that exact text. It does not search for several different words at once.
They stay, because an empty line does not contain your text. To remove them use Remove Empty Lines.
The tool shows a message and leaves your text as it is, so nothing is changed by mistake.
Yes. It is free, needs no account and runs in your browser, so your text is not uploaded to a server.
Last updated: 11 November 2026