Don't spend money to analyze your logs. Do it all free, on your machine, locally β no data ever leaves your browser.
LogLens is a universal log explorer that runs entirely in your browser. Drop any log file in, query it with KQL, visualize it on a timeline, and analyze it with a local AI β all without a single byte of your data touching the internet.
No servers. No SaaS. No subscriptions. Just open the HTML file.
- KQL syntax β
level:ERROR AND service:auth* - Boolean logic β
AND,OR,NOT, parentheses - Ranges β
status_code:>=500,latency_ms:<=100 - Wildcards β
message:*timeout*,src_ip:10.0.* - Regex β
message:/timeout|refused/i,src_ip:/^192\.168\./ - Free text search β type anything, searches all fields
- Timeline histogram β canvas-based, color-coded by log level
- Drag to select a time range directly on the chart
- Quick time filters β Last 5m / 30m / 1h / 6h / 24h / 7d / All
- Custom from/to datetime pickers
- Field value distribution bars (top-10 values per field, click to expand)
- True virtual scroll β renders only visible rows, handles 500k+ logs without slowdown
- Incremental loading β load multiple files, they merge automatically
- Dedup mode β collapse repeated identical messages
| Format | Details |
|---|---|
| JSON / NDJSON | Arrays and newline-delimited |
| CSV | Auto-header detection, quoted fields |
| Syslog | RFC 3164 β host proc[pid]: msg |
| Apache / Nginx | Access logs + error logs |
| Log4j / Log4net | timestamp [thread] LEVEL class - msg |
| CEF / LEEF | Common/Log Event Extended Format |
| logfmt | key=value key="quoted value" |
| GELF | Graylog Extended Log Format |
| W3C / IIS | #Fields: extended log format |
| Docker / k8s | Timestamped container logs |
| Windows Event XML | Exported from Event Viewer or PowerShell |
| .evtx binary | Shows conversion guide with PowerShell/wevtutil commands |
| Plain text | Any .log / .txt β every line becomes a row |
LogLens fully parses Windows XML Event Log format. For binary .evtx files, it detects the format and shows an instant conversion guide:
# Export to JSON (simplest)
Get-WinEvent -Path "C:\path\to\your.evtx" |
Select-Object TimeCreated,Id,LevelDisplayName,Message,ProviderName,MachineName |
ConvertTo-Json -Depth 3 | Out-File -Encoding UTF8 events.json
# Export to XML (preserves all fields β drop directly into LogLens)
$events = Get-WinEvent -Path "C:\path\to\your.evtx"
"<Events>" | Out-File events.xml -Encoding UTF8
$events | ForEach-Object { $_.ToXml() } | Out-File events.xml -Append -Encoding UTF8
"</Events>" | Out-File events.xml -Append -Encoding UTF8Zero-cost AI analysis. No API keys. No cloud. Everything stays on your machine.
Powered by Ollama, the AI panel lets you chat with your logs:
| Action | What it does |
|---|---|
| π Analyze | Top errors, patterns, anomalies, cascading failures |
| π Report | Full incident report β summary, timeline, root cause, actions |
| π‘ KQL Hints | Suggests 8-10 investigative queries you can apply with one click |
| π₯ Root Cause | Identifies the most likely root cause from evidence in the logs |
| π‘ Security Audit | Suspicious IPs, brute force, privilege escalation, exfiltration |
| π Stats | Error rate, latency p95, volume trends, per-service breakdowns |
AI is context-aware β injects your current filter, field names, level distribution, top errors, and up to 100 log sample entries into every request.
Context window control β choose 4K / 8K / 16K / 32K / 128K tokens and how many log entries to include. A live token meter shows usage and auto-prunes conversation history before overflow.
Stop button β abort mid-stream at any time. Partial responses are saved to context.
- Keyboard-first β
j/krows,/search,mbookmark,ccopy,dtheme,?help - Detail panel β Fields / Raw / JSON Tree tabs, prev/next row navigation
- Column picker β choose exactly which columns to display (up to 12)
- Resizable panels β drag handles on sidebar and detail panel
- Saved queries β name and persist your favourite KQL queries
- Query history β last 20 queries, one click to re-run
- Bookmarks β star rows with
m, filter to starred-only - Export β JSON or CSV of current filtered results
- Share URL β encodes your query in
#q=β¦hash, zero log data included - Light / Dark theme β persisted to localStorage
Visit the live deployment. Everything runs in your browser β no data leaves your machine.
https://zrnge.github.io/LogLens/
- Download LogLens.html
- Open it directly in your browser β no server needed
- Drop your log files in
git clone https://github.com/zrnge/LogLens.git
cd LogLens
# Just open LogLens.html in a browser
start LogLens.html # Windows
open LogLens.html # Mac
xdg-open LogLens.html # Linux-
Install Ollama β ollama.com (free, Windows / Mac / Linux)
-
Pull a model:
ollama pull mistral # default β fast, good quality (~4GB) ollama pull llama3.2 # great for analysis (~2GB) ollama pull deepseek-r1:7b # strong reasoning ollama pull phi3 # lightweight (~2GB)
-
Start Ollama with CORS allowed (required for browser access):
Windows CMD:
set OLLAMA_ORIGINS=*&& ollama serve
Windows PowerShell:
$env:OLLAMA_ORIGINS="*"; ollama serve
Mac / Linux:
OLLAMA_ORIGINS=* ollama serveTip (Windows): Set it permanently so you never need to think about it again:
[System.Environment]::SetEnvironmentVariable("OLLAMA_ORIGINS","*","User")
-
Click π€ AI in LogLens β Connect β start asking questions
| Key | Action |
|---|---|
j / β |
Next row |
k / β |
Previous row |
Enter |
Open detail panel for selected row |
Esc |
Close detail / modal |
/ |
Focus search bar |
Ctrl+Enter |
Run KQL query |
m |
Bookmark selected row |
c |
Copy selected row as JSON |
w |
Toggle line wrap |
d |
Toggle dark / light theme |
t |
Toggle timeline |
? |
Show keyboard help |
# All errors and criticals
level:ERROR OR level:CRITICAL
# HTTP server errors
status_code:>=500
# Failed authentication (wildcard)
message:*Invalid* OR message:*denied* OR message:*failed*
# Slow requests
latency_ms:>=1000
# Specific service in production
service:auth* AND env:production
# Regex β find IPs in a subnet
src_ip:/^192\.168\./
# Exclude health checks
NOT url:/health AND status_code:>=400
# Combine everything
level:ERROR AND service:api-gateway AND latency_ms:>=500 AND NOT method:OPTIONS
LogLens is intentionally a single HTML file (~2,500 lines). No build step, no npm, no dependencies, no CDN (except optional Google Fonts for the UI font β falls back to system monospace).
LogLens.html
βββ CSS (theme variables, virtual scroll, AI panel, modals)
βββ HTML (upload overlay, topbar, timeline, KQL bar, sidebar, log table, detail, AI panel)
βββ JavaScript (pure vanilla ES2020)
βββ Auto-parser (12 formats)
βββ KQL engine (AND/OR/NOT/wildcards/ranges/regex)
βββ Virtual scroll (26px fixed rows, buffer rendering)
βββ Canvas timeline histogram
βββ Ollama streaming chat client
βββ localStorage persistence (history, saved queries, theme)
Why a single file?
- Zero setup for end users
- Works offline once cached
- Can be bookmarked, downloaded, and shared as a file attachment
- Zero supply-chain risk
LogLens is architecturally incapable of sending your data anywhere:
- No
fetch()calls to external servers (only tolocalhost:11434for local Ollama) - No analytics, no tracking pixels, no beacons
- No cookies (localStorage only, stays on your device)
- No service workers that could cache and transmit data
- Open source β read every line of the single HTML file yourself
Built by zrnge β open source, free forever.
MIT β free to use, modify, and distribute.
π¬ LogLens 2.0 β built by zrnge for engineers who believe their logs are their own business.
Don't spend money to analyze your logs. Do it all free, on your machine, locally β no data ever leaves your browser.