Skip to main content
Z

Filter Lines — Online Grep to Keep or Remove Matching Lines

Keep or remove lines matching a substring or regex pattern. Invert match, case-insensitive, trim before match.

Free No signup Client-side Privacy friendly Updated

How to use

  1. 1 Paste lines on the left and a pattern below.
  2. 2 Toggle Keep matching (default) or Remove matching.
  3. 3 Switch on Regex for full regular expression power, with i / m / u / s flag toggles.
  4. 4 Copy the filtered result.

Why use this tool

  • Plain substring match by default — no regex special-character traps.
  • Regex mode with the four most-used JS flags exposed as checkboxes.
  • Invert match flips just the match, leaving Keep/Remove logic intact.
  • Bad regex shows inline, never crashes the page.

Frequently asked questions

What is the difference between Invert match and switching Keep/Remove?

They are equivalent — "Remove matching X" is the same as "Keep + Invert match on X". The two controls just make common phrasings ("keep lines that do NOT contain", "remove lines that do NOT contain") quick to express.

What do the regex flags do?

i = case-insensitive, m = multiline (^ and $ match each line), u = full Unicode, s = dot matches newline. We always run per-line so m has limited effect here; useful when your pattern itself spans newline-escaped sequences.

How does Trim before match interact?

The line is trimmed only for the match decision; output lines keep their original leading/trailing whitespace.

Related tools?

Use Deduplicate Lines to drop duplicates, or Sort Lines to reorder after filtering.

What is Filter Lines?

A Filter Lines tool is a tool that keeps or removes lines of text matching a substring or regular expression pattern. It supports inverting the match, case-insensitive comparison, and trimming each line before matching. Running entirely in the browser, it works like an online grep for filtering text, letting users find and remove lines containing specific content without sending data to a server.

Summary

Filter Lines is a free クリエイター utility by Zerethon Tools. Keep or remove lines matching a substring or regex pattern. Invert match, case-insensitive, trim before match. Runs entirely in the browser — no signup, no upload.

Category
クリエイター
Pricing
Free
Privacy
Browser-based
Signup
Not required

Privacy

Your data never leaves your browser unless explicitly stated. Filter Lines runs entirely client-side — no server upload, no logging, no tracking of your input.

Related tools

Build, share, and grow on Zerethon Social

Free signup. Earn points, collect achievements, and connect with creators worldwide.

Try Zerethon free