All Tools View Categories About Contact Privacy

Log File Diff

Compare two log files line by line with a unified diff view.

Runs entirely in your browser — your logs never leave this page.
- 0 removed + 0 added context 0 unchanged

About Log File Diff

When a log changes between deployments, or two systems were supposed to write the same stream, the difference is the story. Log File Diff compares two log files and shows the exact lines that differ — content only in the first file, content only in the second, and the matching context between them — in a familiar unified-diff view with minus-prefixed, plus-prefixed, and space-prefixed lines just like a code diff tool.

The comparison runs as a line-by-line longest-common-subsequence alignment entirely in your browser, the same class of algorithm behind most code-diff tools, so lines that moved around are still recognized as unchanged context rather than being reported as a spurious remove-and-add pair. An Ignore whitespace toggle trims each line before comparing, which helps when the only difference between two files is trailing spaces or inconsistent indentation introduced by a different exporter.

Summary counts above the diff show exactly how many lines were removed, added, or left unchanged, and those counts always match what is rendered below them line for line. For files too large to align in full (the comparison is capped so the page stays responsive), the tool automatically falls back to a count-based comparison: it tallies how many times each distinct line appears in file A versus file B and reports the surplus on each side, clearly labelled as a line-count comparison rather than a full alignment, so it is never mistaken for a true diff.

Features

  • Two-file, side-by-side input — paste file A and file B into their own boxes and diff them in one click.
  • Unified diff view — removed lines prefixed with a minus sign, added lines with a plus sign, and unchanged context lines shown between them, color-coded for fast scanning.
  • Ignore whitespace option — trims each line before comparing, so trailing spaces or indentation differences do not register as changes.
  • Removed / added / unchanged counts — three totals that always match the line-level markers rendered in the diff itself.
  • Large-file fallback — when a full alignment would be too expensive, the tool switches to a labelled line-count comparison so the page stays responsive without freezing on a huge input.
  • Live line counters — each input box shows its own line count as you type or paste, so it is obvious both files loaded correctly before diffing.
  • Copy and download — grab the unified diff as plain text for a ticket, a code review comment, or an archive.
  • 100% local — nothing leaves the browser, no upload, no server round trip.

How to Use

  1. Paste file A into the first box and file B into the second — or click Load sample to see a small worked example first.
  2. Toggle Ignore whitespace if the only expected difference between the two files is trailing spaces or indentation.
  3. Click Diff files. The unified view appears immediately below, along with the removed, added, and unchanged counts.
  4. Review the colored lines — red minus-prefixed lines exist only in file A, green plus-prefixed lines exist only in file B, and gray context lines are common to both.
  5. Watch for the fallback notice on very large inputs — it means the result is a count-based comparison rather than a full line-by-line alignment.
  6. Export the diff with Copy diff or Download for a ticket, a pull request comment, or a teammate.

Examples

Example 1 — Deployment comparison. Diff the error log captured before and after a deploy; the added (plus-prefixed) lines are the new failure messages introduced by the release, and the removed lines show what stopped happening.

Example 2 — Duplicate writer check. Two services are supposed to produce near-identical streams for the same events. Diffing them surfaces the handful of lines only one side produces, which usually points straight at the service with the bug.

Example 3 — Config change review. Diff a health-check or configuration snapshot taken before and after a change to confirm only the intended lines were touched, with everything else showing as unchanged context.

Example 4 — Rollback verification. After rolling a service back to a previous version, diff the current log against a known-good log from before the incident; an empty removed/added count on the relevant section confirms the rollback actually restored the old behavior.

Benefits

  • Pinpoint changes instantly — no manual side-by-side scanning through two long files.
  • Familiar unified view — the same minus/plus/context format every engineer already reads in code review.
  • Whitespace-tolerant — ignore cosmetic noise like trailing spaces without losing real content changes.
  • Counts you can trust — the removed/added/unchanged totals always match what the diff view actually shows.
  • Stays responsive on big files — a labelled fallback keeps the page usable instead of freezing on a huge comparison.
  • Private — all processing stays local; neither file is ever transmitted.

Frequently Asked Questions

What does a log file diff do?
It compares two log files side by side and shows exactly which lines differ: lines only in the first file, lines only in the second, and the unchanged context around them, in the same style as a code diff tool.
How is the comparison done?
A line-by-line longest-common-subsequence diff runs in your browser. Identical lines are treated as unchanged context; lines present in one file but not the other are marked as removed or added. Optionally, leading and trailing whitespace can be ignored before comparing.
What if the files are very large?
The diff algorithm is capped so the page stays responsive. Very large files fall back to a count-based comparison that reports how many lines are unique to each side without the full alignment.
What does the output look like?
A unified diff with minus-prefixed lines for content only in the first file, plus-prefixed lines for content only in the second, and context lines prefixed with a space. Stats show removed, added, and unchanged line counts.
Can I ignore whitespace?
Yes. The Ignore whitespace option trims each line before comparing, which helps when one file has trailing spaces or inconsistent indentation that you do not care about.
Is my data uploaded?
No. Everything runs in your browser.