Filter Lines
Keep or drop the lines that match a substring or regular expression — like grep, but in your browser. Nothing is uploaded.
About this tool
Filter Lines is a friendly grep for your browser: paste some text, give a
pattern, and keep or drop the lines that match.
- Pattern — a literal substring by default. Tick Treat pattern as regex
to use a full regular expression (e.g.
^ERROR,\d{3}-\d{4},(warn|error)). - Mode — keep outputs only the matching lines; drop outputs only the lines that don't match.
- Ignore case — match regardless of upper/lower case.
Everything runs locally in your browser via WebAssembly — your text is never uploaded.
Handy for
- Pulling just the
ERROR/WARNlines out of a log. - Removing comment or blank lines (
dropwith^#or^\s*$). - Keeping lines that contain a particular id, tag, or keyword.
FAQ
Do I need to escape dots and brackets in my pattern?
Not by default — the pattern is a plain substring, so 1.2.3 matches only the literal text 1.2.3. Characters like ., (, and [ only become special once you tick Treat pattern as regex.
What regex flavor is supported?
The Rust regex syntax: character classes (\d, \w), anchors (^, $), alternation ((warn|error)), and repetition all work. Backreferences and lookarounds are not supported. An invalid expression returns an "invalid regular expression" error rather than silently matching nothing.
How do I delete blank lines?
Switch mode to drop, tick Treat pattern as regex, and use ^\s*$ as the pattern — it matches empty and whitespace-only lines, so only lines with content remain.
Why do I get a "pattern is empty" error?
The pattern is required — an empty pattern would match every line (or none), which is rarely what you want, so the tool asks for an explicit substring or regex instead of guessing.
Developer & Automation Access
Run it from the terminal
Same engine as this page, headless — via the gizza CLI:
gizza tool filter-lines "Paste lines to filter…" 'pattern=error'New to the CLI? Get gizza →
Open it by URL
Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:
https://gizza.ai/tools/filter-lines/?text=Paste%20lines%20to%20filter%E2%80%A6&pattern=error&mode=keep®ex=true&ignore_case=trueMachine-readable descriptor: tool.json — title + parameters JSON Schema for agents.
