QQuickKit

Text Diff

Compare two text blocks and highlight differences line by line. Added lines in green, removed in red — paste and compare instantly.

About This Tool

Text diffing is the process of identifying what changed between two versions of a text. It is a core operation in version control systems (like Git), code review tools, and document editing workflows. QuickKit's Text Diff tool shows a line-by-line comparison of two texts, highlighting added lines in green and removed lines in red — powered by the Longest Common Subsequence (LCS) algorithm, the same foundation used by Unix diff and Git.

Features

  • Line-by-line Diff — Compares texts line by line, clearly marking added (+), removed (−), and unchanged lines.
  • Color-coded Output — Added lines are highlighted in green, removed lines in red, and unchanged lines in neutral — instantly readable.
  • LCS Algorithm — Uses the Longest Common Subsequence dynamic programming algorithm for accurate, minimal diff output.
  • Change Summary — Displays a count of added and removed lines at the top of the diff output for a quick overview.
  • Fully Private — All comparison is done in-browser. Your text never leaves your device.

FAQ

What is the LCS algorithm?
The Longest Common Subsequence (LCS) algorithm finds the longest sequence of elements common to two sequences, without requiring them to be contiguous. For text diff, the LCS of the two line arrays gives the set of unchanged lines. Everything not in the LCS is either an addition (in the new text) or a deletion (in the old text). LCS runs in O(m × n) time where m and n are the numbers of lines.
How is this different from a character-level diff?
This tool operates at the line level — it identifies which whole lines were added, removed, or kept. Character-level (or word-level) diffs provide finer granularity, showing the exact characters that changed within a line. Line-level diffs are faster and sufficient for most code and document comparisons; character-level is more useful for prose editing.
What does "unchanged" mean in a diff?
Unchanged lines are lines that appear identically in both the original and modified texts. They provide context to understand where the changes occur. In many diff views, unchanged lines are shown faded or collapsed to focus attention on what actually changed.
Can this detect moved blocks of text?
No. This tool, like standard Unix diff, does not detect moves. A block of lines that has been relocated will appear as a deletion from its original position and an insertion at the new position. Detecting moves (rename detection) requires additional heuristics on top of standard LCS diffing.

Further Reading