Filter Lines

Keep or drop the lines that match a substring or regular expression — like grep, but in your browser. Nothing is uploaded.

Filtered lines

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.

Everything runs locally in your browser via WebAssembly — your text is never uploaded.

Handy for

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&regex=true&ignore_case=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.