Text Cleanup Tools › Find, extract and count
Filter Lines by Text
Keep or remove every line that contains a word or pattern, such as the ERROR lines in a log.
Processed on your device. Nothing is uploaded or stored on a server.
How it works
- Paste your lines.
- Type the word or pattern to look for and choose whether to keep or remove the lines that match.
- Copy the remaining lines.
Example
INFO server started ERROR disk full INFO file saved WARN slow response ERROR timeout on upload
ERROR disk full ERROR timeout on upload
What this tool does
Each line is checked on its own. In keep mode only the lines that contain your text stay; in remove mode those lines are deleted and everything else stays. Matching ignores letter case unless you tick case sensitive. The text is searched for as plain characters, so a dot or a bracket in your search means exactly that. Tick the regular expression box to use patterns, for example ^ERROR to match only lines that start with the word, or \d{4} for lines with a four-digit number. If the pattern is invalid or the search box is empty, the text comes back unchanged. The order of the lines never changes. It is useful for pulling error lines out of logs, dropping comment lines from a config, or keeping the rows of a list that mention a name.
Common problems
Nothing was filtered
The search box may be empty, or the regular expression may be invalid. In both cases the text is returned unchanged. Check the pattern.
Lines that should match were dropped
Check the case sensitive option, and look for a different dash or a non-breaking space in the text you are searching for.
Questions
How do I keep lines containing either of two words?
Use a regular expression with a bar between the words, such as error|warning.
Can I remove comment lines that start with #?
Yes. Turn on regular expressions, search for ^# and choose remove. A comment that is indented needs the pattern ^\s*# instead.
Does it work on large files?
Pasted text of many thousands of lines works fine. Very large files depend on your device memory.
Related tools
Last reviewed 2026-10-14.