Remove Lines Containing

Strip the noise out of a log or a list by deleting every line that matches what you type.

Lines
Filtered lines
Runs locally in your browser

About the Remove Lines Containing

This is grep without a terminal, running on whatever you have on the clipboard. Type a word in the toolbar and every line holding it disappears, which turns a noisy log into something you can actually read. Flip the mode to keep only the matching lines instead, and the same box becomes a filter for pulling one request id or one status code out of thousands of lines.

Five modes cover the usual shapes. Contains is a plain substring test. Start and end anchor to the beginning or end of the line after trimming surrounding whitespace, which is what you want for stripping comment markers or trailing separators. Regular expression mode hands your pattern to the browser engine, so ^\s*# removes comment lines and \b4\d\d\b removes lines carrying a 4xx status. An invalid pattern is reported with the engine message rather than silently matching nothing.

Matching ignores case unless you tick the box, which matters when a level appears as both error and ERROR. The blank line option cleans up the gaps left behind in one pass. If every single line matches, the tool stops and says so rather than handing back an empty pane. To swap text inside the lines you keep, Find and Replace is the next step, and Remove Empty Lines handles whitespace on its own.

How to use

  1. Paste the lines you want to filter.
  2. Type the word or pattern into Match text.
  3. Pick a mode, for example do not contain the text to keep only the matches.
  4. Copy the filtered lines or download them.

Common questions

How do I keep only the lines that match?
Set the mode to "do not contain the text". Everything else is removed, leaving your matches behind.
Can I remove comment lines?
Yes. Use regex mode with ^\s*# so a comment marker is caught even when it is indented.
What if my search word has regex characters in it?
Stay on contains mode and the text is treated literally, so a dot or a bracket needs no escaping.
Why does it refuse when everything matches?
An empty result is almost always a mistake, so the tool reports how many lines matched instead of clearing your work.