TextArray
100% local

Remove lines containing

Filter a list by deleting or keeping only the lines that match a pattern.

Input
Output

Remove lines containing

Type a word or phrase and this tool removes every line that contains it, leaving the rest of your text untouched. Flip the mode and it does the opposite: only the matching lines survive. It is a browser-based grep for the times you have a list in front of you and no terminal — filtering log files down to errors, dropping test accounts from an export, pulling every line that mentions a domain, or cleaning comment lines out of a config file.

Matching ignores capitalisation by default, so "error" finds "Error" and "ERROR" too. Turn on "Case-sensitive" when the difference matters, for example when filtering code identifiers. For anything more precise than a plain substring, enable "Use regular expression" and the pattern becomes a full regex: use ^ and $ to anchor to the start or end of a line, \d for digits, or alternation like cat|dog to match several terms at once. If the expression has a syntax error the tool says so calmly instead of failing silently, and an empty pattern simply returns your text unchanged.

The tally under the output shows how many lines came in, how many remain and how many were removed, updating live as you refine the pattern — so you can watch the filter tighten before you commit to it. Windows and Unix line endings both work, and lists with hundreds of thousands of lines are filtered in milliseconds.

Nothing leaves your device. The tool runs entirely in your browser, which makes it safe for server logs, customer data or anything else you would rather not paste into an online service. Copy the result or download it as a .txt file.

FAQ

How do I keep only the lines I search for?
Switch the mode to "Keep only matching lines". Every line without the pattern is removed instead.
Can I match with a regular expression?
Yes. Enable "Use regular expression" and the pattern is treated as a JavaScript regex, so anchors, character classes and alternation all work.
What happens if my regular expression is invalid?
The tool shows a short message telling you to check the pattern syntax, and your input stays as it is until the expression is valid.
What if I leave the pattern empty?
The text passes through unchanged and the tally reports zero removed lines, so nothing is lost by accident.
Is my text uploaded anywhere?
No. The tool runs entirely in your browser and your text never leaves your device.