Text Comparison Tool
Compare two texts instantly to find added, removed, and changed words, characters, and lines. Review highlighted differences, check text statistics, and export your results for free.
0 characters Β· 0 words Β· 0 lines
0 characters Β· 0 words Β· 0 lines
Clean up:
Compare only these lines (optional)
0 differences
Removed / only in original
Added / only in modified
Unchanged text is shown without a background.
Export & copy
The βunified diffβ export is a readable difference report, not a standards-compliant patch file that can be applied by a patch utility. All processing happens locally in your browser β your text is never uploaded to a comparison server.
Text Comparison Report
'); parts.push('| Mode | ' + esc(modeLabel(R.mode)) + ' |
| Similarity | ' + (R.stats.sim === null ? 'n/a' : R.stats.sim.toFixed(2) + '%') + ' |
| Added units | ' + R.stats.added + ' |
| Removed units | ' + R.stats.removed + ' |
| Unchanged units | ' + R.stats.equal + ' |
| Changed sections | ' + R.stats.hunks + ' |
| Original size | ' + R.stats.aChars + ' chars / ' + R.stats.aWords + ' words / ' + R.stats.aLines + ' lines |
| Modified size | ' + R.stats.bChars + ' chars / ' + R.stats.bWords + ' words / ' + R.stats.bLines + ' lines |
Original text
' + esc(R.textA) + '
Modified text
' + esc(R.textB) + '
Differences
'); if (!R.hunks.length) parts.push('No differences detected.
');
for (var i = 0; i < R.hunks.length; i++) {
var hk = R.hunks[i];
parts.push('#' + (i + 1) + ' Β· ' + esc(describeHunk(hk, R)) + '
');
}
parts.push('');
for (var d = 0; d < hk.dels.length; d++) parts.push('- ' + esc(R.ta[hk.dels[d]].raw) + '');
for (var a = 0; a < hk.inss.length; a++) parts.push('+ ' + esc(R.tb[hk.inss[a]].raw) + '');
parts.push('
