ToolLineup

Remove Lines Containing

This tool removes every line containing any of your search terms, or — with one option flipped — keeps only those lines and discards the rest. Several terms can be given at once, so cutting DEBUG and TRACE out of a log takes one pass rather than two. The search is literal by default and case-insensitive, both of which are usually what you want when filtering logs; regular expressions and case matching are available when precision matters. Whole-line matching is there for the case where you want to remove exact duplicates of a specific value rather than anything containing it. The counts of removed and kept lines are reported.

How it works

Removes every line containing any of your terms, or — with the option flipped — keeps only those lines. Several terms can be given at once, separated by commas.

This is the quickest way to cut a log down to the lines that matter: drop the DEBUG noise, or keep only the ERROR lines, without leaving the browser.

Everything runs in your browser — nothing you paste is sent to a server.

Text input
Paste or type your text here…
Filtered

0 lines removed · 1 kept.

Filtering a log without leaving the browser

The usual way to cut a log down is grep -v DEBUG. That needs the file on a machine with a shell, which is exactly what you do not have when someone has pasted 500 lines into a ticket.

This is the same operation: remove lines containing a term, or keep only those that do. Several terms at once, and a running count of what was removed and what survived.

Literal by default

Log lines are full of characters that mean something in a regular expression — brackets, dots, plus signs, pipes. Treating the search as a pattern by default would make filtering on [ERROR] or GET /api/v1 behave unpredictably, so the search is literal unless you ask otherwise.

Common use cases

  • Stripping DEBUG and TRACE noise out of a pasted log.
  • Keeping only the lines for one request ID.
  • Removing comment lines from a config file.
  • Filtering a list down to the entries that mention a term.

Frequently asked questions

How do I remove lines containing a word?

Paste your text, type the word into the terms box, and every line containing it disappears from the result.

Can I filter on more than one term?

Yes. Separate them with commas. A line matching any of the terms is removed, or kept if you have flipped the option.

How do I keep only the matching lines?

Tick "Keep matching lines instead". This is the equivalent of grep, where the tool default is the equivalent of grep -v.

Does it support regular expressions?

Yes. Tick the option and each term is treated as a pattern, so you can filter on things like ^\d{4}- or (ERROR|FATAL).

What does whole line must match do?

It requires the entire line to equal the term rather than merely contain it, which is how you remove exact duplicates of a specific value.

Is my log sent anywhere?

No. Filtering runs entirely in your browser, so production logs never leave your device.

Related tools