DevTools Logo

Syslog Message Parser

Syslog Message Parser

Decode RFC 3164 and RFC 5424 syslog lines into a sortable PRI, facility, severity and structured-data table.

Runs in your browser
Try an example

Syslog lines

5 MB max · nothing is uploaded

Parsed messages

0 of 0 shown

Paste syslog lines to decode them

RFC 3164, RFC 5424 and raw lines are detected one by one — all parsing happens in your browser.

PRI decoder & reference tables

190 = 23 × 8 + 6 → facility 23 (local7), severity 6 (info)

Facilities (PRI ÷ 8)

CodeName
0kern
1user
2mail
3daemon
4auth
5syslog
6lpr
7news
8uucp
9cron
10authpriv
11ftp
12ntp
13audit
14alert
15cron2
16local0
17local1
18local2
19local3
20local4
21local5
22local6
23local7

Severities (PRI mod 8)

CodeName
0emergency
1alert
2critical
3error
4warning
5notice
6info
7debug

Details

Syslog wire formats pack a lot of meaning into a few characters: the angle-bracketed PRI encodes facility and severity, RFC 5424 adds an ISO timestamp, nil fields and bracketed structured data, while RFC 3164 keeps a compact BSD-style header with no year or timezone. This tool detects the format of every pasted line independently, decodes the PRI arithmetic, normalizes timestamps for cross-format sorting, expands structured-data parameters with escape handling, and lets you filter, sort and export the result. Everything happens in your browser — logs are never uploaded or stored.

More examples

Decode a syslog PRI

<134>Oct 11 22:14:15 router sshd[1234]: Accepted publickey for alice

PRI 134 = 16 × 8 + 6, so this is facility local0 with severity info. The tag parses as app sshd, PID 1234, host router.

RFC 5424 with structured data

<165>1 2003-10-11T22:14:15.003Z mymachine.example.com evntslog - ID47 [exampleSDID@32473 iut="3" eventSource="Application"] An application event log entry

Version 1, fractional UTC timestamp, nil PROCID, and an SD element whose iut and eventSource parameters are expanded into a table. PRI 165 is local4/notice.

PRI 190 is not a warning

<190>Oct 11 22:14:15 kernel: link is up

190 = 23 × 8 + 6: facility local7, severity informational. Warning is severity 4, which would be PRI 188 for local7.

Examples

BSD line with a tag and PID

Input
<134>Oct 11 22:14:15 router sshd[1234]: Accepted publickey for alice
Output
facility local0 · severity info · host router · app sshd · procid 1234

134 = 16 × 8 + 6. RFC 3164 has no year, so the tool infers one and states the assumption.

RFC 5424 structured data

Input
<165>1 2003-10-11T22:14:15.003Z host app - MID [example@1 a="q:\" b=\]"] hello
Output
timestamp 2003-10-11T22:14:15.003Z · a = q:" · b = ] · message hello

The SD scanner unescapes quotes and brackets before showing parameters, while the raw line stays available in the drawer.

About this tool

Syslog Message Parser decodes syslog wire format, not arbitrary log files. Every pasted line is classified as RFC 5424, RFC 3164 (BSD style) or raw, then split into its documented fields: priority, timestamp, hostname, application, PID, message ID, structured data and message. Mixed dumps are fine — each line gets its own format badge.

The priority value inside the angle brackets is decomposed as PRI = facility × 8 + severity. Facility 16 is local0 and severity 6 is informational, so <134> is local0/info; <190> is 23 × 8 + 6, local7/info — warning would be severity 4. The severity scale is inverted: smaller numbers are more severe, from 0 emergency to 7 debug. The decoder shows this arithmetic on every row and in the built-in PRI mini-decoder.

RFC 5424 structured data is scanned with its real grammar: SD-IDs, quoted PARAM-VALUEs and the \" , \\ and \] escapes are decoded instead of regex-guessed. Nil fields become empty columns, ISO 8601 timestamps are normalized with their offsets, and RFC 6587 octet-counted frames (MSG-LEN before the PRI) are consumed as one message even when the payload contains a newline. Parsing is entirely local and session-only.

What this tool does not do

  • Input is capped at 5 MB; larger dumps must be split before pasting.
  • RFC 3164 year and timezone are assumptions, never facts carried by the line; the chosen interpretation is shown as a chip.
  • Structured data follows the RFC 5424 grammar strictly — vendor extensions that are not valid SD are flagged and the raw SD is preserved.
  • This is a decoder, not a syslog collector: no sockets, forwarding, gzip inflation or server-side storage.
  • Exports contain the current filtered view; raw lines are included in CSV and JSON so results can be traced back to the source.
  • Very large result tables are windowed above 500 rows until 'Render all' is chosen.

How to use this tool

  1. Paste or drop syslog lines

    Paste from a terminal or drop a .log / .txt file (5 MB maximum). Files are read in 64 KB chunks with a streaming UTF-8 decoder.

  2. Set timestamp assumptions

    RFC 3164 stamps have no year or zone. Choose UTC or local interpretation and auto rollover or forced current year before reading cross-format time sorts.

  3. Filter and sort

    Filter by severity floor, facility, format, text or flagged lines. Sort by time, severity, facility, host, app or line number using the table headers.

  4. Inspect a row

    Click a row to see the PRI math, the full message, expanded structured-data parameters and the unchanged original line.

  5. Export the filtered view

    Copy or download CSV (optionally with a UTF-8 BOM), Markdown for a ticket, or JSON for a dashboard pipeline.

Use cases

Forwarded-log triage

Paste a forwarding dump, isolate critical and error rows, and export the filtered set for an incident ticket.

Router and switch logs

Decode numeric PRI values from network gear into facility/severity names without memorizing the mapping.

Dashboard mapping

Export JSON with normalized timestamps, facility and severity names for a log pipeline or query prototype.

Recognized wire fields

FormWhat is decoded
<PRI>1–3 digits, 0–191; facility = PRI >> 3 (0 kern … 23 local7), severity = PRI & 7 (0 emergency … 7 debug).
RFC 3164Mmm dd hh:mm:ss host tag[pid]: message. PID-less tags and hostless (relay-stripped) lines are supported.
RFC 5424VERSION TIMESTAMP HOST APP PROCID MSGID SD MSG; every header field may be the nil value -.
Structured data- or one or more [SD-ID param="value" …] elements with \" , \\ and \] unescaping.
TimestampsISO 8601 with fractional seconds and Z/±HH:MM offsets; naive 3164 stamps use the selected zone and year rule.
Octet framingRFC 6587 MSG-LEN SP <PRI>…; the declared byte length is honored across embedded newlines and framed rows are badged.
RawLines without a PRI, or with a PRI but no recognizable grammar, are preserved with an explanatory chip.

Facilities 24–31 are reserved. Vendor SD dialects are parsed with the strict grammar; unusual values are surfaced as chips rather than silently dropped.

Common mistakes

Mistake:Reading severity 4 as 'less severe than severity 6'.

Fix:Syslog severity is inverted: 4 = warning is more severe than 6 = info. The severity filter keeps codes ≤ the selected value.

Mistake:Assuming 190 is a warning because it looks large.

Fix:190 = 23 × 8 + 6 → local7/info; local7 warning is 188. Use the PRI decoder to check the arithmetic.

Mistake:Treating a BSD timestamp as having a year and timezone.

Fix:RFC 3164 omits both. Set the UTC/local and year assumptions explicitly before comparing 3164 and 5424 times.

Mistake:Assuming an octet-counted frame starts with <PRI>.

Fix:RFC 6587 puts MSG-LEN before the space and the PRI after it. The detector honors that layout and badges framed rows.

Frequently asked questions

What does PRI 134 mean?

134 = 16 × 8 + 6: facility 16 (local0) and severity 6 (informational). The angle-bracketed PRI is always facility × 8 + severity, with facility in the upper bits and severity in the low three bits.

How are facility and severity encoded?

Facility uses values 0–23 (0 kern, 1 user, 4 auth, 16–23 local0–local7) and occupies PRI divided by 8. Severity uses 0–7 (0 emergency, 1 alert, 2 critical, 3 error, 4 warning, 5 notice, 6 info, 7 debug) and is PRI mod 8. Note that the severity scale is inverted: 0 is the most severe. For example, 190 = 23 × 8 + 6, so it is local7/info, not a warning — local7 warning would be 188.

What is the difference between RFC 3164 and RFC 5424?

RFC 3164 is the compact BSD format: <PRI>Mmm dd hh:mm:ss host tag[pid]: message, with no year, no timezone and no structured metadata. RFC 5424 adds a version number, ISO 8601 timestamps with offsets, explicit nil fields (-) and bracketed structured-data elements such as [exampleSDID@32473 iut="3"]. The parser detects each line independently, so a mixed dump is fine.

How is structured data parsed?

The scanner reads [SD-ID param="value" …] elements one at a time, requiring quoted values, and decodes the three legal escapes: \" → ", \\ → \ and \] → ]. Multiple elements are allowed, and each parameter is shown in the row's detail drawer with its SD-ID grouping. Malformed brackets or escapes produce a per-line error chip with the original SD text preserved.

How are timestamps from RFC 3164 handled?

Because BSD stamps carry no year or zone, the tool infers the year (with December→January rollover) and interprets the wall-clock time as local time unless you switch the UTC assumption on. The chosen assumption appears as a chip, and RFC 5424 offsets are always applied to normalize cross-format sorting. A 'force current year' toggle is available for logs that were not captured across a year boundary.

What about octet-counted syslog frames?

RFC 6587 non-transparent framing puts the message byte length first: MSG-LEN SP <PRI>… The detector reads that length, consumes the payload across embedded newlines, and badges the row as framed. The plan's <PRI>N spelling is not the wire format, so only the length-before-PRI layout is detected.

Are my logs uploaded or stored?

No. Parsing, filtering and exports all happen in this browser tab. Input is not persisted to localStorage and nothing is sent to a server, so you can safely paste internal hostnames and production log content.

References & standards