Canonical: https://toolipedia.app/grok-pattern-tester

# Grok Pattern Tester

Test a grok pattern against sample log lines, expand named patterns such as IP and TIMESTAMP_ISO8601 and see every field it extracts with its type.

Breadcrumbs: Toolipedia > Developer tools > Code and developer utilities > Grok Pattern Tester

## About Grok Pattern Tester

Grok turns unstructured log lines into fields with named patterns, so %{IP:client} stands for a long address expression and gives the matched text the field name client. This tester expands the standard Logstash patterns, including IP, WORD, NUMBER, URIPATHPARAM, HTTPDATE, TIMESTAMP_ISO8601, LOGLEVEL and COMBINEDAPACHELOG, and runs the result on your sample lines. You can add your own named patterns, convert a field to int or float with %{NUMBER:bytes:int}, and see the full regular expression that was built. A plain regex tester cannot do that expansion.

## How to use Grok Pattern Tester
1. Write or paste a grok pattern such as the sample with IP, WORD and NUMBER.
2. Paste a few real log lines, one per line, and add custom patterns if you use any.
3. Read the matched fields and types, and fix any line that shows no match.

## Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.

## Also known as
- grok pattern tester
- grok debugger online
- test grok pattern
- logstash grok tester
- grok patterns list
- grok ip timestamp_iso8601 example

## Frequently asked questions

### Does it behave exactly like Logstash?

Very close, but the patterns are ported to JavaScript regular expressions. Atomic groups become normal groups and Oniguruma-only syntax is not available, so a rare pattern can match slightly differently from Logstash.

### How do I turn a number into an integer or a float?

Add the type after the field name, for example %{NUMBER:bytes:int} or %{NUMBER:duration:float}. The table then shows the converted value and its type.

### Why does my pattern fail on lines that look right?

Spaces must match exactly, and unanchored grok finds the pattern anywhere in the line. Replace single spaces with %{SPACE} or %{GREEDYDATA} where the format varies, and tick the whole-line option to check the full line.

### Is Grok Pattern Tester free?

Yes. Grok Pattern Tester on Toolipedia is free to use, with no sign-up and no watermark.

### Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

### Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

### Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

## Related tools

More free tools that go well with Grok Pattern Tester:
- [Log Line Pattern Grouper](https://toolipedia.app/log-line-pattern-grouper)
- [Regex tester](https://toolipedia.app/regex-tester)
- [IP address converter](https://toolipedia.app/ip-address-converter)
- [Gitignore and Glob Pattern Tester](https://toolipedia.app/gitignore-and-glob-pattern-tester)
- [Unix timestamp converter](https://toolipedia.app/timestamp-converter)
