LogShaper

logfmt (key=value) to JSON converter

No network access · nothing leaves your browser Support LogShaper
Sanitization Rules
Quick samples:
Ctrl/⌘ + Enter to parse
No data processed yet.
/* Click "Parse & Normalize Schema" to process raw logs */

logfmt to JSON, right in your browser

logfmt lines like level=info msg="cache warmed" keys=1284 are easy to write but awkward to query. LogShaper converts them into proper JSON with real types, so keys becomes the number 1284 and ok=true becomes a boolean.

How to use it

  1. Paste your logs into the box above. An example is already loaded so you can see the result.
  2. Choose what to redact: IP addresses, keys and tokens, and emails are all on by default.
  3. Click Parse & Normalize Schema, then copy or download the JSON, the JSON Schema, or a CSV from the Data Grid.

What you get

Example

Input
time=2026-11-11T10:30:02Z level=info msg="cache warmed" keys=1284 duration=0.42s
time=2026-11-11T10:30:05Z level=warn msg="slow request" path=/api/search status=200 latency_ms=1840
time=2026-11-11T10:30:09Z level=error msg="upstream timeout" service=billing retries=3 fatal=false
ts=2026-11-11T10:30:12Z lvl=info msg="job done" job_id=88 queue=emails ok=true
Output (first 2 of 4 records)
[
  {
    "timestamp": "2026-11-11T10:30:02Z",
    "level": "info",
    "message": "cache warmed",
    "keys": 1284,
    "duration": "0.42s"
  },
  {
    "timestamp": "2026-11-11T10:30:05Z",
    "level": "warn",
    "message": "slow request",
    "path": "/api/search",
    "status": 200,
    "latency_ms": 1840
  }
]

Questions

What counts as a logfmt line?

A line made mostly of key=value pairs, with at least two of them. Lines that are mostly free text keep their text as a message field.

Are values with units like 0.42s converted?

No. They stay strings, so nothing is silently misread. Plain numbers like 1840 become numbers.

Can I get a schema for my logfmt data?

Yes. Open the Inferred Schema tab to get a JSON Schema built from all the lines you pasted.

Is my data uploaded anywhere?

No. Parsing, redaction and schema generation all run in your browser tab. The page's security policy blocks every network request, so pasted logs can't be sent anywhere, and nothing is saved when you close the tab.

More LogShaper tools

Nginx log to JSONAccess logs to structured JSON fieldsRedact secrets from logsScrub API keys, tokens, emails and IPsJSON to JSON SchemaInfer a schema from sample JSONParse stack tracesJava, Python and Node.js traces to JSONSyslog to JSONLinux system logs to structured records