Text & dev tools

0 lines
0 lines
💡 Tip
Use this for: comparing config files, JSON snapshots, code snippets, log diffs, contract revisions. Everything stays on your device — no upload, no server roundtrip.
Diff output

Paste two texts above and click Compare.

How text diffing works

This tool uses the classic LCS (Longest Common Subsequence) algorithm to find the smallest set of line changes that turn the left text into the right text. The result is then rendered with word-level highlighting inside changed lines using a second pass that diffs the words within each modified line.

LCS-based diffing is what git diff, IDEs like VS Code, and Unix diff all use under the hood. It's not perfect — it doesn't understand language semantics — but it works on any text and is fast enough for files up to about 10,000 lines.

  • Unified view — single column with + / - markers. Best for scanning changes quickly.
  • Side-by-side view — original on left, modified on right. Best for code review.
  • Word-level highlight — within a changed line, only the actual changed words are colored. Helps spot tiny edits like a single changed number.
  • Ignore options — useful when whitespace-only changes (e.g., tabs vs spaces, line-ending changes) shouldn't count as diffs.

Text Diff Checker — FAQ

Is my text uploaded to a server?

No. The diff runs entirely in your browser. The text never leaves your device. You can verify this by disconnecting from the internet after the page loads — it still works.

Why does the diff show a line as changed when only one word changed?

By default, diff operates at the line level — any change to a line marks the whole line as "modified" and shows it as a delete + add pair. Enable "Word-level highlights" inside Advanced Options to color only the actual changed words within those lines.

How big a file can I diff?

The LCS algorithm is O(n × m) in time and memory, so two 5,000-line files take ~25M cells of memory — that's already noticeable. For very large files (>10k lines), consider chunking them or using a dedicated tool like diff on the command line.

Why does "ignore whitespace" still show whitespace changes sometimes?

The option only ignores leading/trailing whitespace on each line — interior whitespace (e.g., extra spaces between words) still counts as a change. This matches what diff -w does, and prevents false negatives where " foo" and "foo" would be marked as identical when they're clearly different.

Can I diff binary files?

No — this tool is for text only. Binary files (images, PDFs, .docx) would produce garbage in the textareas. For binary diffs, use cmp or git diff --binary on the command line.