Logfmt to JSON & NDJSON Structured Log Converter

100% Client-Side Private

Parse Go, Heroku, and Grafana Loki key=val logfmt streams into formatted JSON arrays and NDJSON.

Output Format:
4 lines parsed16 unique keys
Detected Fields:level (4)ts (4)caller (4)msg (3)port (1)tls (1)method (1)path (1)status (1)duration (1)remote_ip (1)client_id (1)error (1)db_pool (1)query (1)retries (1)
Read-only preview
[
  {
    "level": "info",
    "ts": "2024-05-10T14:32:01.421Z",
    "caller": "server.go:128",
    "msg": "http server started",
    "port": 8080,
    "tls": true
  },
  {
    "level": "info",
    "ts": "2024-05-10T14:32:05.102Z",
    "caller": "router.go:54",
    "method": "GET",
    "path": "/api/v1/health",
    "status": 200,
    "duration": "1.42ms",
    "remote_ip": "10.0.4.12"
  },
  {
    "level": "warn",
    "ts": "2024-05-10T14:32:12.890Z",
    "caller": "auth.go:88",
    "msg": "invalid jwt signature",
    "client_id": "acme-corp",
    "error": "token expired"
  },
  {
    "level": "error",
    "ts": "2024-05-10T14:32:15.340Z",
    "caller": "db.go:210",
    "msg": "database query timeout",
    "db_pool": "primary",
    "query": "SELECT * FROM users",
    "retries": 3
  }
]

Pin this tool to your browser side panel

Access this utility anytime with Alt+M without switching tabs. 100% offline & free.

Get Extension

How to Convert Logfmt to JSON

  1. 1Paste raw logfmt log lines (e.g. level=info ts=... msg="server started" status=200).
  2. 2Inspect parsed structured objects, field types, and detected keys in real time.
  3. 3Copy formatted JSON array or streamable NDJSON for ingestion into analytics pipelines.

Logfmt Specification

Logfmt is a concise key=value format popularized by Heroku and widely adopted by Go services, Prometheus, and Grafana Loki.

Frequently Asked Questions

Enjoying Logfmt to JSON & NDJSON Structured Log Converter?Help your engineering peers discover private, ad-free tools!

MiniToolDesk is 100% free and client-side. Your support keeps the web ad-free.

Related Developer Utilities