Blog
Text tools

Remove lines containing a word or phrase

Paste a list, a log file or any block of text, type the text you want to match, and every line containing it is removed. Switch on invert to do the opposite and keep only the matching lines — useful for filtering logs down to one keyword.

Your data never leaves this device

Result

Lines removed

This page has no server side at all. The table you paste is parsed by JavaScript inside your own browser, the chart is drawn on a canvas element on your machine, and the export file is assembled locally. Nothing is uploaded, stored or written to any log. You can disconnect from the network after the page has loaded and everything will still work — which is the simplest way to verify the claim yourself.

Facts and limits of this method

Match type Plain substring search, not a regular expression
Default direction Lines containing the text are removed
Invert mode Lines NOT containing the text are removed instead
Case sensitivity Off by default; can be turned on for exact-case matching
Empty pattern Text is returned unchanged, nothing is removed
Processing Runs locally in the browser; nothing is uploaded

When it misleads you

How it is calculated

The text is split into lines on every line break. For each line, the tool checks whether it contains the search text as a substring — using either an exact or a lowercased comparison, depending on the case-sensitivity option.

By default, lines that contain the text are dropped and the rest are kept. With invert switched on, the logic flips: lines that do NOT contain the text are dropped, and only the matches survive.

The remaining lines are re-joined with a single line break each, preserving their original order.

The counter reports how many lines were removed in total: the original line count minus the line count of the result, regardless of which direction was used.

Questions and answers

Can I use a regular expression as the pattern?

No, the match is a plain substring search. If you type "error", any line containing those five letters in a row matches, but you can't use wildcards or character classes.

What happens if I leave the search field empty?

Nothing is filtered — the original text is returned as-is and the removed-lines count stays at zero. This avoids accidentally deleting everything.

How do I keep only the lines with a keyword instead of removing them?

Turn on "invert: keep only matching lines". The tool then removes everything that does NOT contain your search text.

Is the search case-sensitive?

By default, no — "Error" and "error" are treated the same. Turn on the case-sensitive option if you need an exact-case match.

Is my text uploaded anywhere?

No. Everything runs in your browser and the text never leaves your device.

Related tools

All tools