How to use the JSON Lines / NDJSON Log Viewer
Inspect JSON Lines (JSONL), NDJSON, and mixed plain-text logs that contain embedded JSON objects. The viewer parses each line as a separate event, lets you filter by level, message, request ID, or any field, and exports normalized output as a JSON array or message-only text. Designed for engineers and SREs debugging structured logs from Pino, Bunyan, Winston, Logback, Loki, CloudWatch, or any service that emits one JSON object per line — all locally.
What it does
- Parses one JSON object per line (JSONL / NDJSON / LDJSON).
- Handles mixed text logs where each line contains a JSON object somewhere inside.
- Filters by level, message text, request ID, or any custom field.
- Skips invalid lines without breaking the rest of the parse.
- Normalizes output: full event JSON array, message-only text, or selected fields as CSV.
- Optional redaction of common sensitive fields (tokens, emails, IPs) before export.
When to use it
- Triage a copied block of structured logs without uploading to a log service.
- Filter NDJSON exports from Loki, CloudWatch Logs Insights, or Elasticsearch.
- Inspect Pino, Bunyan, Winston, or Logback JSON output.
- Pull all entries for a single
requestId or traceId.
- Build a sanitized sample to attach to a bug report.
- Convert NDJSON into a CSV or JSON array for analysis.
How to use it
- Paste log lines into the editor (or load a
.log / .jsonl / .ndjson file).
- Click Parse logs — valid JSON entries become rows; invalid lines are skipped with a count.
- Filter by level (info, warn, error), message substring, or any field path.
- Click a row to inspect the full event tree.
- Export the filtered set as JSON, message-only text, or CSV. Redact sensitive fields before sharing.
Tips & pitfalls
- If parsing fails on most lines, check that the file is actually NDJSON, not a single JSON array.
- Some log shippers prepend a timestamp / hostname before the JSON object — the viewer extracts the JSON anyway.
- For very large log files, paste a representative window — multi-GB files belong in a real log store.
- Redact PII and secrets before sharing the export — use the PII Detector or Secrets Scanner first.
- Filter fields work on dot-paths (
req.headers.x-trace-id) when events are nested.
FAQ
- What is JSON Lines (JSONL)? A text format where each line is a valid JSON value (typically an object). Also called NDJSON or LDJSON. Common for streaming logs and ML datasets.
- How is JSONL different from a JSON array? JSONL has one object per line, no surrounding
[], no commas between objects. It is appendable and streamable.
- Can I parse logs that mix plain text and JSON? Yes — the viewer extracts the JSON object from each line and treats the surrounding text as metadata.
- Are my logs uploaded? No. All parsing, filtering, and redaction happen in your browser.
- How do I follow a single request through the logs? Filter by
requestId, traceId, or correlationId field.
- Can I export filtered logs? Yes — as JSON array, message-only text, or CSV of selected fields.
Runs locally in your browser. No uploads. Redact secrets and PII before sharing log samples.