Free Grok Debugger for Logstash
Free online Logstash grok testing with no signup or log uploads. Match logs locally in your browser with Oniguruma, use pattern autocomplete, then copy a paste-ready filter.
Free · No log uploads · Oniguruma · Pattern autocomplete · Paste-ready Logstash filter
Examples
One pattern per line. Lines are tried in order, like match => [..]. Type %{ for pattern autocomplete, or press Ctrl+Space.
Each line is tested separately. Nothing is sent to a server.
Logstash patterns_dir format: NAME regex per line. These override built-ins and stay in this browser.
Results
Use this in Logit.io
When the match looks right, paste this as its own top-level filter { } section in the Logit.io Filter Editor and run it on a hosted Logstash pipeline. Do not nest it inside an existing filter { }. Referenced Logit.io extras become pattern_definitions. See how to apply this filter in Logit.io.
filter {
grok {
match => {
"message" => '%{COMBINEDAPACHELOG}'
}
ecs_compatibility => "v1"
named_captures_only => true
keep_empty_captures => false
}
date {
match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ]
target => "@timestamp"
locale => "en"
}
}
logstash-patterns-core v4.3.4, vscode-oniguruma and Oniguruma 6.9.10. Licences
What is grok?
Grok turns unstructured log messages into fields by combining reusable, named regular expressions. For example, %{IP:client} recognises an IP address and stores it as client. Use it for logs whose structure varies, such as an application message with an optional process ID, or when a built-in pattern already describes your Apache or syslog format.
If every line has the same delimiters and field order, consider Logstash's dissect filter first: it splits on those delimiters without regular expressions. You can also dissect a stable prefix, such as a timestamp and service name, then use grok on the variable message that remains. Choose based on several representative lines, including missing values and error cases, rather than one line that happens to match.
A grok token takes the form %{SYNTAX:SEMANTIC:type}. SYNTAX is a pattern name such as IP or HTTPDATE. SEMANTIC is the destination field. Captures are strings unless you request a conversion: :int for a status code or :float for a duration. Matching digits and converting them to a number are separate steps.
This page is a free online grok debugger that runs Oniguruma locally in your browser without uploading sample logs. It includes the ECS v1 and legacy patterns from logstash-patterns-core 4.3.4. Use it to check the extracted fields before testing the filter in your pipeline; the same regex engine family does not guarantee identical pipeline behaviour.
How to use this grok debugger
Build the pattern a field at a time. After each addition, check both the matched text and the JSON; a successful match can still extract the wrong value or leave part of the line unparsed.
- Pick an example or paste log lines into Sample logs.
- Write a pattern in Grok patterns, one per line. Type
%{or press Ctrl+Space for autocomplete. Patterns are tried in order until the first match. - Choose ECS v1, Legacy, or Logit.io extras for the built-in names and field layout your pipeline needs.
- Add any custom definitions as
NAME regex, one per line, in Custom patterns. - Check Results against several log lines, then copy the generated filter into the Logit.io Filter Editor as its own top-level section. Do not nest the exported
filterblock inside another.
Options
named_captures_onlykeeps fields with names. Disable it to also capture bare tokens such as%{IP}under the pattern name. Plain unnamed regex groups are never stored.keep_empty_capturesretains fields that matched an empty string; it does not create fields for optional groups that never matched.- Share links contain a compressed copy of the editor state in the URL hash. Anyone with the link can restore that text, so use sanitised samples. Opening a link waits for you to press Run.
Worked examples
For this walkthrough, select ECS v1, leave named_captures_only on and keep_empty_captures off, and clear Custom patterns unless a definition is supplied below. Paste each sample and pattern into the corresponding editor, then compare Results with the expected JSON.
Success: nested ECS fields and :int
Sample: 203.0.113.10 GET /health 200
Pattern: %{IP:client} %{WORD:[http][request][method]} %{NOTSPACE:[url][path]} %{INT:[http][response][status_code]:int}
{
"client": "203.0.113.10",
"http": {
"request": { "method": "GET" },
"response": { "status_code": 200 }
},
"url": { "path": "/health" }
}The bracketed field names create nested objects. Remove :int and the status becomes the string "200". Selecting ECS v1 changes built-in definitions; it does not rename your own captures such as client automatically.
Failure: longest prefix points at the query string
Sample: 203.0.113.10 GET /health?ready=1 200
Broken: %{IP:client} %{WORD:method} %{URIPATH:path} %{INT:status:int}
Fixed: %{IP:client} %{WORD:method} %{URIPATHPARAM:path} %{INT:status:int}
URIPATH stops at /health. The next part of the pattern expects a space, but the sample has ?, so the line fails. URIPATHPARAM consumes the path and query string together:
{
"client": "203.0.113.10",
"method": "GET",
"path": "/health?ready=1",
"status": 200
}The resulting path still includes the query. Rename the capture to [url][original] if that is the field you need; use a separate parsing step if you need individual query parameters.
Syslog: expand a built-in pattern into ECS fields
Load the Syslog example above. The preset selects ECS v1 and supplies this exact fixture:
Sample: Mar 16 00:01:25 evita postfix/smtpd[1713]: connect from camomile.cloud9.net[168.100.1.3]
Pattern: %{SYSLOGLINE}
{
"timestamp": "Mar 16 00:01:25",
"host": { "hostname": "evita" },
"process": { "name": "postfix/smtpd", "pid": 1713 },
"message": "connect from camomile.cloud9.net[168.100.1.3]"
}SYSLOGLINE contains named captures inside its definition, so it produces fields even without a field name on the outer token. Switch to Legacy and compare: the host becomes logsource, the process name becomes program, and pid is a string. The timestamp is still text and contains neither a year nor a timezone; your pipeline must supply that context when converting it to an event timestamp.
Custom pattern: capture a request ID before a fallback
Sample: request=req-7f3a status=503 duration=12.5ms
Custom patterns: REQUEST_ID req-[0-9a-f]{4}
Put these two lines in Grok patterns. The first requires a request ID with four lowercase hexadecimal digits; the second captures anything left unmatched for inspection.
^request=%{REQUEST_ID:[request][id]} status=%{INT:status:int} duration=%{NUMBER:duration_ms:float}ms$
^%{GREEDYDATA:unparsed}${
"request": { "id": "req-7f3a" },
"status": 503,
"duration_ms": 12.5
}Try request=req-XYZ: it reaches the fallback and stores the whole line in unparsed. Reverse the two patterns and even the valid sample goes straight to that fallback. This debugger stops at the first match, like Logstash's default break_on_match behaviour. A catch-all can therefore hide parse failures; keep it last and monitor its output. The generated filter includes the custom definition as pattern_definitions.
Compatibility and limits
This page matches a single log line with the same pattern library Logstash expands. It is not a full pipeline simulator: conditionals, multiple filters, codecs, and plugin timeouts can still differ in production.
| Item | This debugger |
|---|---|
| Regex engine | Oniguruma 6.9.10 (same family as Logstash Joni) |
| Pattern library | logstash-patterns-core 4.3.4 (ECS v1 + legacy) + Logit.io extras |
| Library window | Ships with Logstash 8.19–9.5; library pin, not a full stack matrix |
| Nested fields / :int / :float | Supported |
| Inline (?i) and named groups | Supported |
| Matcher timeout | 1.5 seconds per run in the browser worker |
| Not simulated | Pipeline if/else, codecs, multiline assembly, and plugin-only options |
Pattern sources: logstash-patterns-core v4.3.4 · Logstash grok filter reference.
Grok syntax in 30 seconds
| Token | Meaning |
|---|---|
| %{PATTERN} | Match the named pattern and do not capture it. |
| %{PATTERN:field} | Capture the match as field. |
| %{PATTERN:[nested][field]} | Capture into a nested ECS-style field. |
| %{PATTERN:field:int} | Capture and convert to an integer. |
| %{PATTERN:field:float} | Capture and convert to a floating point number. |
| (?<field>regex) | An inline named group, allocated in the same way as a grok capture. |
| (?i)pattern | Fold case for the rest of the expression. Oniguruma syntax, not a grok token. |
| ^…$ | Anchor the match to the start and end of the line. |
Common grok patterns
These names come from the ECS v1 set on this page. The definition column is the stored pattern, not a rewritten example, so it stays aligned with logstash-patterns-core 4.3.4.
| Pattern | Matches | Example | Definition |
|---|---|---|---|
| IP | IPv4 or IPv6 address | 203.0.113.10 | (?:%{IPV6}|%{IPV4})(?:%{IPV6}|%{IPV4}) |
| IPORHOST | IP address or hostname | app.example.com | (?:%{IP}|%{HOSTNAME})(?:%{IP}|%{HOSTNAME}) |
| WORD | A single word | GET | \b\w+\b\b\w+\b |
| NOTSPACE | A run of non-space characters | /health | \S+\S+ |
| NUMBER | An integer or decimal | 0.002 | (?:%{BASE10NUM})(?:%{BASE10NUM}) |
| INT | A signed integer | 200 | (?:[+-]?(?:[0-9]+))(?:[+-]?(?:[0-9]+)) |
| DATA | A lazy match of any text | Mozilla/5.0 | .*?.*? |
| GREEDYDATA | The rest of the line | started in 1.2s | .*.* |
| TIMESTAMP_ISO8601 | An ISO-8601 timestamp | 2026-10-03T16:21:09Z | %{YEAR}-%{MONTHNUM}-%{MONTHDAY}[T ]%{HOUR}:?%{MINUTE}(?::?%{SECOND})?…%{YEAR}-%{MONTHNUM}-%{MONTHDAY}[T ]%{HOUR}:?%{MINUTE}(?::?%{SECOND})?%{ISO8601_TIMEZONE}? |
| HTTPDATE | An Apache-style date | 03/Oct/2026:16:21:09 +0000 | %{MONTHDAY}/%{MONTH}/%{YEAR}:%{TIME} %{INT}%{MONTHDAY}/%{MONTH}/%{YEAR}:%{TIME} %{INT} |
| LOGLEVEL | A common log level word | ERROR | ([Aa]lert|ALERT|[Tt]race|TRACE|[Dd]ebug|DEBUG|[Nn]otice|NOTICE|[Ii]nf…([Aa]lert|ALERT|[Tt]race|TRACE|[Dd]ebug|DEBUG|[Nn]otice|NOTICE|[Ii]nfo?(?:rmation)?|INFO?(?:RMATION)?|[Ww]arn?(?:ing)?|WARN?(?:ING)?|[Ee]rr?(?:or)?|ERR?(?:OR)?|[Cc]rit?(?:ical)?|CRIT?(?:ICAL)?|[Ff]atal|FATAL|[Ss]evere|SEVERE|EMERG(?:ENCY)?|[Ee]merg(?:ency)?) |
| COMBINEDAPACHELOG | A combined Apache access line | 203.0.113.10 - - [03/Oct/2026:16:21:09 +0000] "GET / HTTP/1.1" 200 12 "-" "-" | %{HTTPD_COMBINEDLOG}%{HTTPD_COMBINEDLOG} |
| SYSLOGLINE | A classic syslog line | Oct 3 16:21:09 host app[12]: ready | %{SYSLOGBASE2} %{GREEDYDATA:message}%{SYSLOGBASE2} %{GREEDYDATA:message} |
Troubleshooting grok patterns
By default, when no pattern matches, Logstash tags the event _grokparsefailure. This tool shows the same miss as an unmatched line and attempts to show the longest matching prefix. Use that highlight to narrow the problem, then check:
- Pattern set and field names. Match ECS v1 or Legacy to your pipeline's
ecs_compatibility. A built-in may match in both sets while emitting different names or types, as the Syslog example shows. Include any custom definitions or Logit extras the pattern references. - Accidental partial matches. An unanchored expression can match a substring and still report success. Use
^and$when the whole line must match. Replace broadGREEDYDATAcaptures between fields with delimiters or narrower tokens such asNOTSPACE; keep greedy free text for a genuine message tail. - Query strings. A URL that worked yesterday may now include
?page=2. UseURIPATHPARAMwhen the captured value includes a query, and test both forms. - Integer conversion.
%{INT:status}captures a string; add:intfor a number. A placeholder such as-is not an integer, so model it as a separate alternative instead of expecting conversion to repair it. Use:floatfor decimal values. - Timeouts. This tool stops a browser worker run after 1.5 seconds. Reduce the sample to one failing line and remove ambiguous repetitions or overlapping catch-alls. A browser timeout is not a pipeline performance benchmark; validate the pattern under your Logstash
timeout_millissetting.
For a step-by-step investigation, see Fix _grokparsefailure with Logit’s Grok Debugger. Keep the failing line alongside successful fixtures when retesting a fix.
How this compares to other grok debuggers
Kibana and OpenSearch Dev Tools
The Kibana Grok Debugger and OpenSearch Dashboards Grok Debugger sit inside their stack's Dev Tools. They suit teams with access to that environment; Kibana also requires the manage_pipeline permission when Elastic Stack security is enabled. This page needs no stack connection and exports a Logstash filter with your custom definitions and capture options.
Use Kibana's debugger instead when you are preparing a pattern for your Elasticsearch deployment and want to check it there. For processor order, failure handling, or interactions with other ingest processors, follow with an ingest pipeline simulation. For Logstash, test the exported filter in Logstash itself; neither a standalone match here nor Kibana's debugger runs your complete Logstash pipeline.
JavaScript and WebAssembly testers
Check the regex engine, pattern-library version, and output behaviour separately. A port that translates grok to JavaScript RegExp may differ on Oniguruma syntax. WebAssembly alone does not establish which engine or capture features a tester provides. If it lacks nested fields or :int conversion, a text match cannot validate the JSON shape or numeric types your pipeline expects. This debugger supports those features with Oniguruma and the pinned 4.3.4 library; use the nested-field fixture above to check the output when moving between tools.
If you arrived looking for a grok pattern generator, start with the Apache combined, Nginx access, or Syslog preset and adapt it to your log format. The export generates configuration from the pattern you supply; it does not infer a new pattern from arbitrary logs. Test variations such as a missing user agent, a query string, and an error response before putting that configuration into service.
Frequently asked questions
Does this grok debugger send my logs anywhere?
No. Patterns, sample logs, and custom definitions are processed in your browser. Share links contain a compressed copy of that text in the URL hash. The hash is not sent to Logit.io servers as part of this tool, but anyone with the link can read the restored samples.
Is this the same grok engine as Logstash?
It uses Oniguruma, the same engine family as Logstash's Joni, plus logstash-patterns-core v4.3.4 (ECS v1 and legacy) and recursive %{SYNTAX:SEMANTIC} expansion. A running pipeline can still differ on timeouts, plugin options, and very new Unicode properties such as \p{Garay}, which compile here but not in Logstash.
How do I use a working pattern on Logit.io?
Copy the generated filter { grok { ... } } block, start a Logit.io trial, and paste it as its own top-level section in the Filter Editor. Custom patterns are emitted as pattern_definitions. Do not nest the block inside an existing filter.
What pattern sets are included?
ECS v1 and legacy from logstash-patterns-core, plus a Logit.io extras set for generic Nginx, AWS ALB, AWS ELB TCP, IIS W3C, Spring Boot, log4net, Java stack frames with module names, Heroku Logplex, Cloud Foundry syslog, and Kubernetes CRI lines.
What is a grok pattern tester?
A grok pattern tester, or grok debugger, runs a grok expression against sample log lines and shows which fields it extracts, so you can fix a pattern before it causes _grokparsefailure tags in production.
Is this an online Logstash grok debugger?
Yes. Open it in a browser, choose the pattern set that matches your pipeline, and compare the extracted fields with the values you expect. You can export a Logstash grok filter, including custom definitions, then test it in your running pipeline. The debugger checks patterns; it does not run Logstash.
Why does my grok pattern work here but fail in Logstash?
Usual causes are field types (:int and :float), ecs_compatibility (ECS v1 versus legacy names), timeout, and escaping. This online grok debugger uses Oniguruma, but a running pipeline can still differ on plugin options and timeout defaults.
What is the difference between grok and dissect?
Grok matches with named regular expressions. Dissect splits a line on delimiters without regex. Use dissect when the layout is fixed and grok when values vary in shape or you want existing pattern names. Both can convert values to int or float (dissect through convert_datatype).
Is the grok debugger free?
Yes. Pattern testing, autocomplete, and filter export are free, with no signup or usage quota. Logs are processed locally in your browser. The matcher stops after 1.5 seconds per run so a hostile pattern cannot freeze the tab. A Logit.io trial is separate and needs no credit card.
Related reading
Fix _grokparsefailure with the Grok Debugger · Advanced grok patterns for Logstash · Managed log management · Logit.io grok filter docs
Canonical grok plugin notes live in the Logstash grok filter reference.
Logstash is a trademark of Elasticsearch B.V., registered in the U.S. and in other countries. Logit.io is not affiliated with or endorsed by Elastic. Trademarks
Why parse with Logit.io
When the pattern works here, put it on a hosted pipeline. Same grok filter, managed stack.
Hosted Logstash pipelines
Parse and enrich data before it lands in managed indexes, and paste the generated filter into the Filter Editor. Skip the ops of running your own Logstash fleet.
Hosted Logstash →ELK and OpenSearch
Logit.io runs ELK and OpenSearch so you get search, dashboards, and pipelines without self-hosted ops.
Hosted ELK →Hosted OpenSearch
Prefer OpenSearch-first search and APIs? Get managed OpenSearch with dashboards on the same platform.
Hosted OpenSearch →Managed alerting
Search and dashboards run on OpenSearch with real-time alerting to Slack, PagerDuty, webhooks, and more.
Alerting →Log management
Centralise log collection, parsing, search, and alerting on managed OpenSearch — without running your own ELK cluster.
Log management →UK and EU data residency
Logit.io is a UK-based platform with customisable data residency options, including UK, European and US data centres. ISO 27001 certified, a PCI DSS Service Provider Level 1, and SOC 2 compliant, with GDPR-ready controls.
Security and compliance →Trusted by engineering teams worldwide
Companies feel the difference when they use Logit.io
“Internally, Logit.io has made it easier for us to provide better support for our customers, since finding individual messages based on various data in the payload has become easier.”
“At Youredi, pretty much everyone from our technical support teams through to our professional services teams uses Logit.io.”
Start your 14-day free trial
No credit card required. Put the filter you just tested on a hosted Logstash pipeline.