All Tools View Categories About Contact Privacy

Log Grep

Find the lines you care about in any log — plain text or regex, with context and match highlighting.

Runs entirely in your browser — your logs never leave this page.
0
lines
0
matching
0
unique
0%
matched

    

About Log Grep

Log files are big, and the line you need is one ERROR buried among ten thousand INFO lines. Log Grep is a browser-native grep: paste any log text and filter it down with a plain text term or a full regular expression, with match highlighting, line numbers, invert match to remove noise, and context lines before and after every hit — the same workflow as grep -n -B -A, minus the terminal.

Type error and every offending line lights up. Need precision? Flip to regex and write ^TRACE.*cache or 5\d\d for HTTP 5xx codes, or \bconn(ection)?\s*(reset|refused)\b to catch every phrasing of a network failure at once. Every hit is counted, unique matches are tallied, and matching text is highlighted inline so you can see the reason at a glance without re-reading the whole line.

Line numbering matches the file exactly, including blank lines — so the number you see next to a hit is the number you would get from your editor or from grep -n on the same file, and context lines stay correctly adjacent even when a log has blank separators between entries. That matters when you paste the result into a bug report or point a teammate at "line 4812" and expect them to land on the right row.

The output is painless to work with: copy the filtered block, download it as plain text, or export matches as JSON with line numbers and match flags for scripts and dashboards. It is all local — no upload, no sign-up, no 50 MB file limit, and nothing about your log ever touches a server.

Features

  • Plain text search — instant, optionally case-insensitive filtering.
  • Regular expression mode — full JavaScript pattern support: anchors, character classes, alternation, backreferences.
  • Match highlighting — the matching substring is marked inline on every shown line.
  • Invert match — show the lines that do not match, to strip noise instead of finding it.
  • Context lines — print N lines before and after every hit, up to 20 each way.
  • Accurate line numbers — numbering always matches the original file, blank lines included.
  • Summary cards — total lines, matches, unique matches, match percentage.
  • Copy / Download TXT / Download JSON / print export.
  • 100% local — nothing leaves the browser.

How to Use

  1. Paste your log. Drop any log text into the box, or click Load sample to see it in action.
  2. Type a pattern. A plain word like error, or enable Regex for patterns like ^2025.*FATAL.
  3. Read the summary. Cards show total lines, matching lines, unique matches and match percentage, updated on every search.
  4. Tune the view. Turn on invert to keep only non-matching lines, or add before/after context lines to see the surroundings of each hit.
  5. Re-run as you refine. Adjust the pattern or options and click Search again to narrow in on exactly the lines you need.
  6. Export. Copy or download the filtered lines, or save matches as JSON with line numbers for a script.

Examples

Example 1 — Find failures. Search ERROR on a request log and every failing line appears with its real line number; highlights mark the word ERROR in each row.

Example 2 — HTTP status codes. Regex ((4|5)\d\d) matches 4xx and 5xx status codes across any log format, whatever column they sit in.

Example 3 — Remove debug noise. Invert on DEBUG to keep only WARN and above, useful before pasting a log into a ticket.

Example 4 — Stack traces. Search at (org|com)\. with 2 lines of context before to collect a chunk of stack frames around each exception, without missing the line that triggered it.

Example 5 — Reproducing a report. A teammate says "check line 4120" from their own grep run. Because line numbers here always match the original file — blank lines included — you land on the exact same row.

Benefits

  • Grep power without a shell — no install, works on any device with a browser.
  • Context tells the whole story around each error, not just the matching line.
  • Invert strips noise in one click instead of writing a negative-lookahead regex.
  • Line numbers you can trust — they always match the source file, blank lines and all.
  • JSON export feeds matches straight into scripts or dashboards.
  • Private — all processing is local, so production logs never leave your machine.

Frequently Asked Questions

Is this like the Unix grep command?
Yes — it finds the lines in your log that match a pattern, shows line numbers, and can print context lines around each hit, exactly like grep -n -B -A. You get the same search power without installing anything.
Can I use regular expressions?
Yes. Flip the Regex toggle on and type any JavaScript-style pattern, for example ^2025.*ERROR to match lines that start with a 2025 timestamp and contain ERROR, or \b3\d{2}\b to match numbers in the 300s.
What does invert do?
Invert shows every line that does NOT match your pattern instead. Useful for removing noise — for example invert on debug to see everything except debug lines.
What are context lines?
The number of lines printed before and after each match, so you can see what happened right around an error. Matches are highlighted and context lines are dimmed.
How do I get the results out?
Copy the filtered lines as text, download them as a .txt file, or download the matching lines as JSON with line numbers and match flags.
Is my log uploaded anywhere?
No. Everything runs locally in your browser with no network requests.