Logfmt Parser
Parse key=value structured logs into typed fields. Inspect every key, see the log's schema, and export to JSON, NDJSON, or CSV.
Parsed output will appear here.
About Logfmt Parser
The Logfmt Parser is a free online tool that reads logfmt — the structured logging format built from space-separated key=value pairs — and breaks each line into individual, typed fields. Logfmt is the default log style on Heroku and is widely used by Go services, container platforms, and command-line tools because it stays readable to humans while remaining easy for machines to parse.
Paste one or more log lines and the parser splits every record into its keys and values, detects the type of each value (string, integer, float, boolean, or null), and builds a key-schema summary showing which keys appear, how often, and with what types. When you are ready, export the parsed data as JSON, NDJSON for streaming pipelines, or CSV for spreadsheets. It also validates as it goes, flagging unterminated quotes, stray equals signs, and duplicate keys.
Everything runs entirely in your browser, so even sensitive production logs never leave your device. If you would rather reformat or prettify logs than extract them, try the companion Logfmt Formatter.
How to Use Logfmt Parser
- Paste your logfmt lines into the input box, or click Load Sample to try it. Each non-empty line is parsed as one record.
- Choose an export format — JSON, NDJSON, or CSV.
- Leave Coerce types on to turn numbers and booleans into real JSON types, or turn it off to keep raw strings.
- Review the Key Summary to understand the log schema and the Parsed Fields panel for a field-by-field breakdown with types.
- Check the validation banner for warnings, then click Copy to grab the exported data.
Common Use Cases
Loading logs into a spreadsheet
Export parsed logs to CSV and open them in Excel or Google Sheets to filter, sort, and chart your log fields.
Feeding a log pipeline
Convert key=value lines to NDJSON so each record can stream into jq, a data warehouse, or a log processor.
Understanding an unfamiliar log stream
Use the key summary to see which fields exist, how often they appear, and whether their types are consistent.
Debugging type assumptions
See exactly which values are parsed as numbers vs strings before you rely on them downstream.
Extracting structured data
Pull clean JSON objects out of raw Heroku or container logs for tests, fixtures, or reports.
Validating log output
Catch unterminated quotes and duplicate keys that would break a downstream parser.
Frequently Asked Questions
What does the Logfmt Parser do?
It reads logfmt — the structured logging format made of space-separated key=value pairs — and breaks each line into individual fields you can inspect. For every field it shows the key, the value, and the detected type (string, integer, float, boolean, or null), then lets you export the parsed data as JSON, NDJSON, or CSV.
How is this different from the Logfmt Formatter?
The Logfmt Formatter focuses on re-emitting logs in different shapes — pretty, expanded, table, or JSON. The Logfmt Parser focuses on inspection and extraction: it shows a field-by-field breakdown with types, a key-schema summary across all records, and structured exports (including CSV and NDJSON) for loading into other tools.
How are types detected?
Unquoted values that look like whole numbers become integers, decimals become floats, true/false become booleans, and null becomes null. Quoted values always stay strings, and a bare key with no value is treated as the boolean true. Turn off "Coerce types" to keep every value as a raw string in JSON and NDJSON output.
What is the key summary for?
The key summary lists every distinct key across all parsed records, how many times it appears, the type(s) it takes, and an example value. It is a quick way to understand the schema of an unfamiliar log stream — which fields exist and whether a field is consistent or mixes types.
When should I use NDJSON or CSV output?
NDJSON (newline-delimited JSON) emits one JSON object per line, which is ideal for streaming into log pipelines and tools like jq. CSV produces a spreadsheet-friendly table where columns are the union of all keys — handy for opening parsed logs in Excel, Google Sheets, or a data notebook.
Is my log data sent to a server?
No. Parsing, type detection, and all exports happen entirely in your browser. Your log lines never leave your device — nothing is uploaded or stored.