Line Filter
Keep or remove lines by keyword or regex, matching any or all patterns, and count what stays. Runs locally in your browser.
This tool runs entirely in your browser. Your input is never uploaded.
2026-01-01 GET /index.html 200 2026-01-01 POST /login 200 2026-01-02 GET /health 200
Line Filter
Keep or remove lines by keyword or regular expression, without uploading anything. Everything runs locally in your browser.
Features
- Keyword or regex — plain keywords are matched literally, so
a.cnever matchesabc. Switch to regex mode for patterns like^ERROR\b. - Any or all patterns — one pattern per line. Keep lines matching at least one of them, or only lines matching all of them.
- Keep or remove — invert the match to delete the matching lines instead of keeping them, like
grep -v. - Ignore case —
Erroranderrorare the same token unless you turn case sensitivity on. - Drop empty lines — remove blank lines in the same pass.
- Counts — see the total number of lines, how many stayed, how many were removed, and how many patterns are active.
- Highlighted matches — every matched span in the result is highlighted, so you can see why each line stayed. In remove mode the surviving lines are the non-matches, so nothing is highlighted.
- Export — copy the filtered text, move it into the input to keep working on it, or download it as a
.txtfile.
An invalid regular expression is reported instead of silently dropping every line, so a typo never wipes your output.
All processing stays on your device; no data leaves the browser.
Related tools
Find and Replace
Find and replace text with literal rules, regular expressions, batch replacement, and multiple rule sets.
Open ToolText Deduplicator
Remove duplicate lines or words locally in your browser, keep first or last occurrence, and view duplicate counts.
Open ToolText Sorter
Sort lines alphabetically, by pinyin, number, length, random order, or custom priority rules, ascending or descending.
Open Tool