PRPickrack

Text Diff Checker

Compare two text blocks line-by-line. LCS algorithm, browser-side, no upload.

+2 added1 removed=3 unchanged
Diff result
11 Hello world
2The quick brown fox
2+The slow brown fox
33 jumps over the lazy dog
4+Goodbye
45 End

Compare two text blocks line-by-line with an LCS-based diff. Color-coded additions, deletions, and unchanged lines.

Text Diff Checker is the everyday 'what changed between these two versions?' tool. You have an old config file and a new one and want to know what changed. You're comparing two versions of an email draft. You're checking whether a translation kept the original structure. You're spot-checking AI output against the source.

Pickrack's Diff Checker uses the classic [LCS](https://en.wikipedia.org/wiki/Longest_common_subsequence_problem) (longest common subsequence) algorithm to compute a line-by-line diff. Common lines stay aligned; differences are marked with + (added in B) or (deleted from A) and color-coded green/red. Optional 'ignore whitespace' and 'ignore case' toggles for fuzzy comparisons.

Free, no signup, browser-side. Inputs and the diff result never leave your tab. Works on inputs up to a few thousand lines (LCS is O(n*m) — fine for typical config files, slow for novels).

Key features

  • LCS-based line diffIndustry-standard algorithm. Common lines stay aligned, differences appear as +/− with the original line numbers preserved on both sides.
  • Color-coded resultGreen for additions, red for deletions, plain for unchanged. Side-by-side line numbers show where each line came from in the original.
  • Ignore whitespaceToggle to collapse whitespace and trim before comparing — useful when you only care about content changes, not formatting.
  • Ignore caseToggle to ignore upper/lower differences. Useful for case-insensitive comparisons (email headers, SQL keywords).
  • Live countsHeader shows live count of additions, deletions, and unchanged lines. Updates as you type.
  • Browser-side, no uploadBoth inputs and the computed diff stay in your browser. No server roundtrip.

How to use

  1. Step 1: Paste the original (A)Left textarea — the 'before' version. Could be old config, old email, old code, version 1 of anything.
  2. Step 2: Paste the modified (B)Right textarea — the 'after' version. The tool figures out what changed between A and B.
  3. Step 3 (optional): Toggle ignore optionsCheck 'Ignore whitespace' to skip differences that are only formatting. Check 'Ignore case' for case-insensitive comparison.
  4. Step 4: Read the diffBelow the inputs, each row shows: A line number, B line number, marker (+/−/blank), and the line content. Color-coded green (added), red (removed), neutral (unchanged).

When to use

  • Config file diff — paste old and new server config, see exactly what was added/removed
  • Email draft review — compare two versions of an email you're editing, see what your edits actually changed
  • AI output verification — diff your prompt's source text against the AI's edit to confirm only intended changes
  • Code review — paste two function versions, see the diff inline without opening a code review tool
  • Translation review — diff the original and translated text against the source language to verify structure preservation
  • Document version control — when you forgot to track changes in Word/Google Docs, paste both versions here to recover what changed

Frequently asked questions

What's the maximum input size?

Practical limit ~5,000 lines per input. The LCS algorithm is O(n*m) so 5,000 × 5,000 ≈ 25M comparisons — fast on a modern laptop (under 1 second). Larger inputs become noticeable; truly large (50,000+ lines) may slow the browser.

Why is the algorithm 'LCS' instead of 'Myers diff' or 'Patience'?

LCS is the textbook baseline — straightforward, deterministic, easy to reason about. Production tools (git diff, GitHub) use Myers (faster on long inputs with localized changes) or Patience (better at handling reordered blocks). For this tool's use case (interactive paste-and-compare under 5k lines), LCS quality matches Myers and the code is simpler.

Does it do character-level or word-level diff inside a changed line?

Not in v1 — the diff is line-level only. Two lines that differ by one word both show as one line removed + one line added. Sub-line diff (showing 'foo became bar' inline) is on the roadmap.

What if my texts have different line endings (CRLF vs LF)?

Texts pasted from Windows (CRLF) and Unix (LF) sources may look identical visually but diff as completely different. Toggle 'Ignore whitespace' to normalize this — it collapses all whitespace and trims each line before comparing.

Can I export the diff?

Not in v1 — the diff renders as an HTML table. You can copy the result manually or screenshot it. Export to unified diff format (+/- patch syntax) is on the roadmap.

Why does the diff show two lines changed when I only modified one?

When you change a line, the algorithm represents it as 'remove the old line, add the new line' — two operations. There's no 'modify' operation in line-level diff. If you want fewer ops, use 'Ignore whitespace' or 'Ignore case' to collapse spurious differences.

Is the diff sensitive to trailing newlines?

Yes — an extra blank line at the end of one input shows as an addition. Either remove trailing blanks before pasting, or toggle 'Ignore whitespace' which trims each line.

Does it work for non-English text?

Yes — the algorithm compares JavaScript strings character-by-character, which handles UTF-16 (including emoji, CJK, RTL scripts) natively.

Related tools