ctrlb-decompose
Turn millions of noisy log lines into compact patterns with typed variables, quantiles, anomalies, and LLM-ready output.
Runs as a CLI, in the browser via WASM, or as a Rust library — no logs ever leave your machine.

Website: ctrlb.ai
Try it in 60 seconds
No install, no signup — the whole pipeline (CLP encoding, Drain3 clustering, typing, stats) runs client-side in WebAssembly.
- Open ctrlb.ai/decompose
- Paste or drop in a log file (or click Generate Example to try it with sample data)
- Hit Analyze and watch thousands of lines collapse into a handful of typed patterns
Before / after
A real 56,482-line Apache-style error log, decomposed live in the browser demo:
Before — raw, repetitive, un-skimmable:
[Thu Jun 09 06:07:05 2005] [error] env.createBean2(): Factory error creating channel.jni:jni ( channel.jni, jni)
[Thu Jun 09 06:07:05 2005] [error] config.update(): Can't create channel.jni:jni
[Thu Jun 09 06:07:05 2005] [error] env.createBean2(): Factory error creating vm: ( vm, )
[Thu Jun 09 06:07:05 2005] [error] config.update(): Can't create vm:
[Thu Jun 09 06:07:05 2005] [error] env.createBean2(): Factory error creating worker.jni:onStartup ( worker.jni, onStartup)
... 56,477 more lines like this ...
After — 25 typed patterns, ranked by volume, in 246ms:
ctrlb-decompose: 56,482 lines → 25 patterns (100.0% reduction)
Time range: 06:07:04 UTC → 03:49:01 UTC
Pattern #1 [ERROR] (20,862 occurrences, 36.9%)
"<TS> [error] [client <*>] <*> <*> <*> <*> <*>"
Variables:
IPv4: 456 unique values
String: 46 unique values
Enum: does (100.0%), to (0.0%)
Enum: not (100.0%), serve (0.0%)
Enum: exist (100.0%), directory (0.0%)
String: 81 unique values
Pattern #2 (7,044 occurrences, 12.5%)
...
Output modes
HUMAN mode — colored, for terminal investigation:

LLM OPTIMIZE mode — compact markdown for feeding into an LLM:

Resources
How It Works
ctrlb-decompose uses a two-stage normalization and clustering pipeline that processes logs in a single streaming pass with minimal memory footprint.
┌──────────────────────────────────────────────┐
│ ctrlb-decompose pipeline │
└──────────────────────────────────────────────┘
Raw Log Lines
│
▼
┌──────────────┐ Strip & parse timestamps (ISO 8601, Apache,
│ Timestamp │ syslog, Unix epoch, etc.) into normalized
│ Extraction │ <TS> markers with DateTime values.
└──────┬───────┘
│
▼
┌──────────────┐ Replace integers, floats, IPs, and strings
│ CLP │ with compact placeholder bytes. Structurally
│ Encoding │ identical lines now produce the same "logtype."
└──────┬───────┘
│
▼
┌──────────────┐ Tree-based similarity clustering (Drain3) groups
│ Drain3 │ logtypes into patterns. Differing tokens become
│ Clustering │ <*> wildcards. Incremental — no second pass needed.
└──────┬───────┘
│
▼
┌──────────────┐ Merge CLP-decoded values with Drain3 wildcard
│ Variable │ positions. Classify each variable into semantic
│ Extraction │ types: IPv4, UUID, Duration, Enum, Integer, etc.
│ & Typing │
└──────┬───────┘
│
▼
┌──────────────┐ DDSketch quantiles (p50/p99), HyperLogLog
│ Statistics │ cardinality estimation, top-k values, temporal
│ Accumulation │ bucketing, and reservoir-sampled example lines.
└──────┬───────┘
│
▼
┌──────────────┐ Frequency spikes, error cascades, low-cardinality
│ Anomaly │ flags, bimodal distributions, and clustered
│ Detection │ numeric detection.
└──────┬───────┘
│
▼
┌──────────────┐ Keyword-based severity (ERROR > WARN > INFO > DEBUG),
│ Scoring │ temporal co-occurrence, shared variable correlation,
│ & Correlation│ and error cascade detection across patterns.
└──────┬───────┘
│
▼
┌──────────────┐
│ Output │──── Human (ANSI terminal) / LLM (compact markdown) / JSON
└──────────────┘
Stage 1 — CLP Encoding