Guide
How to Compare Two Texts and Spot Every Difference
Learn how text diff tools highlight additions and removals, and how to use them for editing, version control and review.
A text diff compares two versions of a text and highlights what changed — lines or words added, removed, or modified. It is the same idea behind version-control systems, scaled down to two pasted blocks.
How diffing works
A diff algorithm finds the longest common subsequence between two texts, then marks everything else as an addition (in the new version) or a removal (from the old version). Line-level diffs compare whole lines; word-level diffs compare within lines for finer detail.
Reading a diff
- Unchanged lines appear as plain text.
- Removed lines (from the original) are marked, often in red or with a minus.
- Added lines (in the new version) are marked, often in green or with a plus.
- Modified lines show as a removal plus an addition when compared at word level.
How to compare two texts
- Paste the original text in the first field.
- Paste the revised text in the second field.
- Run the diff and read the highlighted changes.
- Use word-level diff for prose and line-level diff for code or lists.
Examples
Original: "The quick brown fox." Revised: "The slow brown fox." A word-level diff highlights "quick" as removed and "slow" as added, with the rest unchanged — making the single edit obvious at a glance.
When a text diff is useful
- Reviewing edits to an article, contract, or brief.
- Comparing two versions of a config or code snippet.
- Checking what changed between drafts.
- Verifying a find-and-replace did what you expected.
Put it into practice
Use the Text Diff right now — free, in your browser, no sign-up required.
Try the Text DiffMore guides
- How to Unscramble Letters Into Words
- How to Find Anagrams of Any Word
- How to Count Words, Characters and Reading Time Accurately
- How to Find Words by Pattern, Length and Letters
- How to Use a Random Word Generator for Games, Writing and Brainstorming
- How to Count Characters (With and Without Spaces)
- How to Convert Text Between Cases (UPPER, lower, Title, camelCase and More)
- How to Clean Up Messy Text (Spaces, Line Breaks and Whitespace)
Related free tools
More free online utilities that pair well with this one — same-category tools for the same task, plus handy extras from other categories.