Diff Checker
Paste two texts and see exactly what changed — line by line, with inline highlights.
- Free
- No account
- Runs in your browser
- Nothing uploaded
Paste original and modified text to compare them side by side.
Runs entirely in your browser — your input is never uploaded, logged, or stored.Privacy policy
What is Diff Checker?
A diff checker compares two pieces of text and shows the differences between them. It tells you which lines were added, which were removed, and which stayed the same.
This tool uses the Longest Common Subsequence (LCS) algorithm — the same fundamental approach used by git diff. It finds the minimum set of changes needed to transform one text into another, so you see the most meaningful differences rather than every trivial line shift.
Two viewing modes: • Side-by-side shows the original and modified text next to each other, with matching lines aligned. Best for reading through changes visually. • Unified diff shows changes in a single column with + and - markers, like git diff output. Best for copying into commit messages or code reviews.
Changed lines also get inline word-level highlighting — not just which line changed, but exactly which words within that line were added or removed. Everything runs locally in your browser; no text is uploaded anywhere.
Diff algorithm (Longest Common Subsequence):
1. Split both texts into lines. 2. Build a dynamic programming table comparing every pair of lines to find the longest common subsequence — the largest set of lines that appear in both texts in the same order. 3. Backtrack through the table to produce an edit script: a sequence of 'equal', 'add', and 'remove' operations. 4. For lines marked as changed (adjacent remove + add), run a second pass to highlight the specific word-level differences within those lines.
The LCS approach guarantees the minimum number of line changes. It runs in O(n*m) time where n and m are the line counts of the two inputs. For typical text sizes this completes instantly.
Word-level highlighting within changed lines uses the same LCS algorithm on the words of each line pair, so you see exactly which tokens moved, appeared, or disappeared.
Worked examples
- Changed line: "Hello World" → "Hello There World" highlights "There" as added
- 3 lines, 1 changed: result shows 2 equal, 1 removed, 1 added
- Empty old text: all lines in new text are additions
- Identical texts: all lines shown as equal, zero changes
How to use Diff Checker
- Paste the original text in the left panel.
- Paste the modified text in the right panel.
- The diff appears automatically as you type.
- Switch between Side-by-side and Unified views.
- Added lines are green, removed lines are red, unchanged lines are gray.
Common errors
- Diff looks wrong — check that you pasted the right versions. Swapping old and new reverses which lines are shown as added vs. removed.
- Too many changes to read — if the texts are mostly different, the diff will be mostly additions and removals. Try comparing smaller sections.
- Line numbers don't match expected — the diff aligns lines by content, not by position. A removed line pushes subsequent line numbers down by one.
- Word highlighting seems off — inline highlighting runs on adjacent changed-line pairs. If changes are far apart, only the line-level diff shows.
FAQ
What algorithm does this diff checker use?
It uses the Longest Common Subsequence (LCS) algorithm — the same fundamental approach that git diff uses. It finds the minimum set of line changes needed to transform one text into another.
What's the difference between side-by-side and unified diff?
Side-by-side shows the original and modified text in two columns, with matching lines aligned. Unified diff shows everything in one column with + and - markers, like git diff output. Unified is more compact and easier to copy into code reviews.
Does this upload my text anywhere?
No. Everything runs locally in your browser. No text is sent to any server. You can verify this in your browser's Network tab — there are no outgoing requests when you paste text.
How are word-level differences highlighted?
When two adjacent lines are different, the tool runs a second diff pass on the words within those lines. Added words are highlighted in green, removed words in red. This shows you exactly which tokens changed, not just which line.
Is there a size limit for the texts I can compare?
The algorithm runs in O(n*m) time where n and m are the line counts. For texts up to a few thousand lines it completes instantly. Very large files (10,000+ lines) may take a moment but will still work.
Related tools
Prefer AllUtil on Google
One click adds AllUtil to your Google preferences. You'll see our tools highlighted with a Preferred badge in Search and AI answers.