DEV Community

Sujal Khatri
Sujal Khatri

Posted on

How to Compare Two Texts and See Exactly What Changed (Free Diff Checker)

Someone sends back your document and says "I only changed one small thing." Your job is to find out whether that is true — and if it isn't, exactly what moved.

That is what a diff does. You paste the original on one side and the new version on the other, and it shows you, line by line, what was added, what was removed, and what stayed the same. No re-reading the whole document. No trusting your memory of what the old version said.

How to read a diff

A diff is line-based, and three colours are all you need:

  • Added (green) — a line that exists in the new version but not the old one.
  • Removed (red) — a line that was in the old version and is gone now.
  • Unchanged — everything else. The bulk of any document, and the part you can safely skip.

The counts matter as much as the colours. "1 line added, 1 line removed, 2 unchanged" tells you in one glance that this was a small edit — or, if the counts are big, that "one small thing" was a lie.

A worked example

Version A — the price list you sent:

Basic plan — 499/month
Pro plan — 999/month
Support — email only
Enter fullscreen mode Exit fullscreen mode

Version B — what came back:

Basic plan — 499/month
Pro plan — 899/month
Support — email only
Enter fullscreen mode Exit fullscreen mode

The diff reports 1 line added, 1 line removed, 2 lines unchanged: the Pro price dropped by 100, and nothing else moved. Without a diff, that single changed digit hides in a wall of otherwise identical text — and a changed digit is exactly the kind of edit that costs real money.

Three mistakes that make diffs useless

  1. Comparing texts with different formatting. If one version came from a PDF, its lines break differently and the diff drowns in false changes. Normalise both texts first — same line breaks, same spacing — then compare.
  2. Assuming "same line count" means "same text". A swapped word, a changed price, or a deleted "not" keeps the line count identical. Only the content comparison catches those.
  3. Diffing in the wrong direction. "Added" means present in the second text but not the first. Before you conclude someone deleted a line, check which version you pasted on which side.

The free tool I built

I make BulkTextKit — 15 free text tools that run 100% in your browser, nothing uploaded. The Text Diff Checker is the one I open for this job: paste the original on the left, the new version on the right, hit Compare — additions show green, removals show red, with a count for each.

One line on Pro: BulkTextKit Pro ($19 one-time, no subscription) adds Bulk mode — diff up to 50 text pairs at once instead of doing them one by one.

What is the smallest edit you have ever caught with a diff that turned out to matter?

Top comments (0)