← All Tools

Logfmt Parser & Formatter

Logfmt is the loose key=value key="quoted value" log convention popularized by Heroku, Go's log/slog, and Splunk. This tool parses any pasted log lines into a structured table, lets you edit fields, and re-serializes them with correct quoting and escaping. Mixed quoted/unquoted values, embedded equals signs, and backslash escapes are all handled.

Parse
Build
lines parsed 0 pairs 0 unique keys 0 warnings 0

    
Values containing whitespace, =, or quotes are wrapped in "..." with \ and " escaped per the logfmt convention.

Logfmt rules at a glance

  • Pairs are space-separated: key=value key2=value2. Whitespace inside a quoted value is preserved.
  • Keys are bare identifiers (no quoting). Reserved/invalid characters in a key make the pair ambiguous.
  • A bare value runs until the next unescaped whitespace. To include spaces, =, or quotes, wrap in double quotes.
  • Inside "...", backslash escapes \\ and \" are honored. Other backslashes are kept verbatim.
  • A key with no value (flag) parses as flag=true — same as Heroku's convention.
  • Repeated keys are kept in order; the table shows all occurrences.