How to Read and Query NDJSON Logs with Zero Setup
Modern backend systems, Kubernetes pods, and distributed services generate high-volume telemetry as structured JSON logs. However, reading thousands of raw lines via terminal buffers or rudimentary text editors makes incident triage slow and error-prone. This browser-based JSON Log Viewer provides an instantaneous, private workspace to analyze, filter, and inspect structured logs directly on your local machine.
How to Use in 4 Simple Steps
- Import Your Logs: Drag and drop any
.log,.jsonl, or.ndjsonfile into the drop zone, or click Paste to insert directly from your clipboard. - Filter by Severity: Click any of the color-coded level chips (
ERROR,WARN,INFO,DEBUG) to isolate faulty requests or unexpected exceptions. - Query Custom Fields: Use the query bar to filter with expressions such as
status >= 500,user.id = 42, or free-text keywords with full regex support. - Inspect Deep JSON Trees: Click any row in the virtualized table to inspect formatted stack traces, drill down into nested objects, and copy payloads for local debugging.
Example: Raw NDJSON vs Structured Table
Observe how raw newline-delimited logs are parsed into an organized, readable structure with automated timestamp normalization and severity tagging:
2024-05-18T10:14:22Z stdout F {"level":"error","ts":1716027262000,"msg":"Database pool connection timeout","service":"billing-worker","error":{"code":"ETIMEDOUT","retries":3},"user":{"id":8491,"plan":"enterprise"}}
2024-05-18T10:14:23Z stdout F {"level":"info","ts":1716027263000,"msg":"Payment webhook received","service":"payments","event_id":"evt_98319"}
[10:14:22] [ERROR] Database pool connection timeout
├─ service: "billing-worker"
├─ user.id: 8491
└─ error.code: "ETIMEDOUT" (retries: 3)
[10:14:23] [INFO] Payment webhook received
└─ event_id: "evt_98319"
Why Structured Logging Matters in Production
Traditional flat-text logs like [ERROR] user 42 failed to purchase item 99 force engineers to craft brittle regex strings to parse parameters. In contrast, structured logging outputs logs as newline-delimited JSON objects with typed keys (such as duration_ms, trace_id, http.status). This guarantees high auditability across microservice architectures.
Popular logging libraries across ecosystems—including Pino, Winston, and Bunyan in Node.js, Zap and Zerolog in Go, and Serilog in .NET—adopt NDJSON as their default output standard. This tool automatically recognizes standard field names across all major conventions.
Common Log Formatting Problems Handled Automatically
Log viewing tools often choke on real-world log discrepancies. This viewer is built to handle edge cases with resilient fallbacks:
- Container Prefixes: Docker, containerd, and Kubernetes often append timestamp and stream tags (e.g.
2024-05-18T14:02:11.1923Z stdout F) before the opening curly brace. Our parser automatically detects and removes these wrappers. - Mixed Non-JSON Lines: System crash traces or legacy print statements that lack JSON syntax are preserved as flagged
RAWrows so critical context is never lost. - Numeric Severity Encodings: Pino and Bunyan record levels as integers (e.g.
10=TRACE,20=DEBUG,30=INFO,40=WARN,50=ERROR,60=FATAL). These are mapped automatically to standardized labels. - ISO vs Epoch Timestamps: Unix timestamps formatted in seconds, milliseconds, or ISO-8601 strings are instantly recognized and localized according to your preferences.
Frequently Asked Questions
What is NDJSON?
How do I read JSON logs?
Does it support Docker and Kubernetes logs?
Is my log data uploaded anywhere?
What file size limit does the viewer handle?
Related Developer Tools
Discover more free, privacy-first developer utilities built by MafLabs: