DevTools Logo

Log Parser

Log Parser

Turn log lines into structured rows with a regex — named capture groups become columns.

Pattern

Presets:

Use named groups like (?<ip>\S+) to name columns. One log line becomes one row.

Log lines

Examples

Parsing an Apache access line

Input
Preset: Apache/Nginx CLF
127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326
Output
ip=127.0.0.1    user=frank
timestamp=10/Oct/2000:13:55:36 -0700
request="GET /apache_pb.gif HTTP/1.0"
status=200        bytes=2326

Named capture groups in the preset (ip, user, timestamp, request, status, bytes) become columns automatically — no mapping step required.

About this tool

The Log Parser applies a regular expression to each line of a log file and collects the matches into structured rows. The key idea is named capture groups: write (?<ip>\S+) and an ip column appears automatically — there is no separate column-mapping step. Built-in presets for the Apache/Nginx Common Log Format and RFC 3164 syslog get you started by pasting a few access lines and immediately reading them as a table.

The result view switches between a table, a JSON array, and RFC 4180 CSV with one-click copy. Lines that do not match are counted and listed separately so you can tighten the pattern, and unmatched lines are grouped rather than silently dropped. Everything runs in your browser — no log data ever leaves your machine.

How to use

  1. Paste lines or load a preset

    Choose the Apache/Nginx Common Log Format or RFC 3164 syslog preset, or start with your own pattern and paste in the log lines.

  2. Write the pattern with named groups

    Use (?<name>…) capture groups so each named group becomes a column; unnamed groups fall back to group_1, group_2, …

  3. Review and export

    Inspect the table, check which lines did not match, then copy the JSON array or RFC 4180 CSV into your pipeline.

Use cases

Analyze web access logs

Parse Nginx or Apache access lines into rows, then count status codes or find the paths serving 404s and slow responses.

Feed a log pipeline

Turn ad-hoc grep output into well-structured CSV or JSON for a log aggregator, spreadsheet, or quick script.

Extract fields from application logs

Pull IPs, levels, timestamps, and messages out of arbitrary app logs with one regex instead of multiple splits.

Common mistakes

Mistake:Using unnamed capture groups.

Fix:Name the groups — (\S+) yields a meaningless group_1 column, while (?<ip>\S+) produces a labeled ip column.

Mistake:Forgetting to escape regex metacharacters.

Fix:Dots, slashes and brackets in log formats must be escaped (or matched with \S+ / \d+) so the pattern matches the literal line.

Mistake:Assuming every line will match.

Fix:Unmatched lines are counted and listed separately — inspect them and tighten the pattern rather than ignoring the gap.

Frequently asked questions

References & standards