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
- Paste your logs into the box above. An example is already loaded so you can see the result.
- Choose what to redact: IP addresses, keys and tokens, and emails are all on by default.
- Click Parse & Normalize Schema, then copy or download the JSON, the JSON Schema, or a CSV from the Data Grid.
What you get
- Quoted values:
msg="cache warmed"keeps its spaces - Typed values: integers, decimals,
true/falseandnullare converted - Normalized names:
msgbecomesmessage,time/tsbecometimestamp,lvlbecomeslevel - Levels:
warningbecomeswarn,errbecomeserror
Example
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
[
{
"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
Keep LogShaper free
LogShaper has no ads, no tracking and no sign-up, and that's not going to change. If it saved you some time, a small donation helps cover hosting and new features.
♥ Support LogShaper