Free online tool. All processing is client-side. No signup needed.
A Text Diff (difference) tool compares two blocks of text and highlights exactly what changed — additions, deletions, and modifications — line by line and character by character. Diff tools are essential in software development for reviewing code changes (git diff), in legal and business for comparing contract versions, in content editing for tracking revisions, and in data analysis for spotting differences between datasets. The tool uses the Longest Common Subsequence (LCS) algorithm to compute the minimal set of changes needed to transform text A into text B.
Paste original text on the left and modified text on the right. The diff engine computes the differences using a character-level or line-level comparison algorithm. Results are displayed with color coding: red background for deleted text, green for added text, and unchanged text in white. Options include: line-by-line mode (good for code and structured text), word-by-word mode (good for prose and documents), and inline diff (changes shown within lines).
LCS Algorithm (Longest Common Subsequence):\nD[i,j] = 0 if i=0 or j=0\nD[i,j] = D[i−1,j−1] + 1 if A[i] = B[j]\nD[i,j] = max(D[i−1,j], D[i,j−1]) otherwise\n\nBacktrack from D[m,n] to find the diff:\n• Diagonal move = unchanged\n• Up move = deleted from A\n• Left move = added to B\n\nSimilarity = LCS Length ÷ max(len(A), len(B)) × 100%
Line diff compares text line by line and is best for code, logs, and structured text. Character/word diff finds changes within lines and is better for prose, editorial changes, and paragraphs.
Git diff compares file versions tracked in git history and includes metadata (commit, author, line numbers). Our tool is a general-purpose text comparison for any two pieces of text, not tied to version control.
Free online Text Diff — no signup, 100% client-side processing. All data stays in your browser.