Filter / grep a log file
Keep (or drop) lines matching a plain substring or a regex. Like every tool here the whole file is held in memory at once (see src/defineTool.ts). A log genuinely in the multiple-GB range can exceed what a browser tab can hold; this does not stream from disk. Runs entirely on your device.
Runs on your device. The file is never uploaded.
Filter / grep a log file keeps the lines matching a substring, or a JavaScript regex when useRegex is on. Kept lines land in a file with -filtered before the extension; invert keeps the ones that miss instead. Nothing streams from disk; the text and the kept lines both sit in memory, so a multi-gigabyte log will not fit.
Questions
How big a log can it handle?
That depends on your device, and this is the tool most likely to hit the limit. The whole file is read into memory as text, split into lines and filtered there, with the kept lines held as a second copy. A log genuinely in the multiple gigabyte range can exceed what a browser tab holds. It does not stream from disk, so for those, use grep on a machine that can.
Does it search plain text or regular expressions?
Plain substring by default. Turn useRegex on and the pattern is compiled as a JavaScript regular expression, and an invalid one is refused up front with "invalid regex" and the reason. caseSensitive is on by default and applies to both modes; turning it off lowercases both sides for the substring search and adds the i flag for the regex.
Can I remove matching lines instead of keeping them?
Yes. Turn invert on and every line that does not match is kept, which is the equivalent of grep -v. It combines with the other options, so you can invert a case insensitive regex. The count line still reports how many lines were kept out of the total, counted after the inversion, and no file is written when nothing is kept.
What is the output called?
Your file name with -filtered inserted before the extension, keeping the extension you had, or .log if the file had none. So app.log becomes app-filtered.log. Kept lines are joined with LF and a trailing newline is added, so CRLF input comes back as LF.
Why did I not get a file?
Because nothing matched. When zero lines match, the tool reports "0 of N lines matched" and writes no file, since an empty download would be misleading. Whenever at least one line matches you get both the count and the file.
Does my log leave the device?
No. The file is read and filtered in a Web Worker in your own tab, with no upload and no account. That matters for logs in particular, since they often carry addresses, tokens and user data you do not want on a server you do not control.