All Tools View Categories About Contact Privacy

Docker Container Log Formatter

Auto-detect JSON, prefixed, and plain container log lines — then align them.

Runs entirely in your browser — your logs never leave this page.
0
Lines
0
stdout
0
stderr
0
JSON records

  

About Docker Container Log Formatter

Container logs are never in one shape: the JSON file driver wraps every line in a structured record, older stacks emit stdout: prefixes, and busy apps just print raw text. Docker Container Log Formatter auto-detects each line, pulls out timestamp and stream, and renders a clean, aligned stream of time | stream | message rows you can scan — or export as TSV.

JSON records with embedded newlines are expanded into continuation lines, so a stack trace stays readable under a single timestamp instead of melting into the next record.

Detection is per-line and format order doesn’t matter: a JSON-driver record, a stderr:-prefixed line and a bare unbranded line can sit side by side in the same paste — as they often do when you copy from docker-compose logs across services with different logging drivers — and each is classified independently.

Features

  • Auto-detect JSON, prefixed, and plain lines — no need to tell the tool which format you’re pasting.
  • Timestamp + stream extraction — pulls the ISO timestamp and stdout/stderr stream out of whichever format matched.
  • Aligned time | stream | message columns — a configurable timestamp width keeps every row lined up for fast scanning.
  • Multi-line JSON messages expanded — a single JSON record whose log field contains embedded newlines becomes several aligned continuation rows.
  • Per-stream counts — stdout, stderr and JSON-record totals in the stats row, so you can see the split at a glance.
  • TSV export — a tab-separated version of the same rows, ready to paste into a spreadsheet or feed to another tool.
  • Local only — nothing you paste is ever uploaded.

How to Use

  1. Paste container logs — from docker logs, docker-compose logs, or the raw JSON file driver output.
  2. Set the timestamp width (default 23 characters) if you want a wider or narrower time column.
  3. Format. Every non-blank line becomes one or more time/stream/message rows, with multi-line JSON messages expanded automatically.
  4. Check the stats — total lines, stdout vs stderr counts, and how many were parsed as structured JSON records.
  5. Copy the aligned view for a terminal-style read, or click TSV to export the same data as tab-separated columns for a spreadsheet.

Examples

Example 1 — docker logs --follow. Plain mixed stdout/stderr lines are split by stream and aligned under one timestamp view, making it easy to see which stream an error actually came from.

Example 2 — JSON driver. Records from the json-file logging driver parse into their time, stream and log fields, with embedded newlines in the message kept intact as continuation lines instead of collapsing into one unreadable row.

Example 3 — Legacy compose. stdout:/stderr:-prefixed lines from older docker-compose versions land cleanly without manual stripping — the prefix itself becomes the stream column.

Example 4 — Spreadsheet triage. Export a noisy container’s output as TSV and drop it into a spreadsheet to filter, sort or pivot on the stream and timestamp columns.

Benefits

  • Mixed-format tolerance — JSON, prefixed and plain lines can all appear in the same paste.
  • Readable output — aligned columns and a configurable timestamp width make scanning fast even in long pastes.
  • Multi-line preservation — stack traces and multi-line messages inside JSON records stay whole under their original timestamp.
  • Export-ready — TSV output plugs straight into spreadsheets or downstream scripts.
  • Private — all formatting happens client-side; container logs never leave your browser.

Frequently Asked Questions

Which Docker log formats are supported?
The JSON file driver format — <code>{"log":"...","stream":"stdout","time":"..."}</code> — the legacy prefixed format (<code>stdout: message</code>), and plain unbranded lines. Each line is auto-detected and handled accordingly.
What does the output look like?
Every entry is laid out in aligned columns: timestamp, stream (stdout/stderr), and message. You can copy the aligned text or export a clean TSV for spreadsheets and pipelines.
How are JSON timestamps handled?
ISO 8601 timestamps from the JSON driver are kept as-is and truncated to milliseconds for readability. Lines without a timestamp are marked with a dash so ordering stays obvious.
Does it merge multi-line messages?
Yes — if a message in a single JSON record contains embedded newlines, they are rendered as continuation lines under the same timestamp and stream.
Is my data uploaded?
No. Formatting runs entirely in your browser.