Compare two texts
Paste two texts and instantly see the differences line by line — added (green) and removed (red).
The comparison runs entirely in your browser; the text is never sent anywhere. It works line by line: a green line was added in B, a red line was removed from A.
How to use
- Paste the original or older text in box A and the newer version in box B.
- The comparison runs instantly: green lines were added in B, red lines were removed from A.
- To hide differences that don't matter, turn on ignore case and ignore whitespace.
- The counter at the top tells you how many lines were added and removed.
How the comparison works
The tool works line by line using the longest common subsequence (LCS) algorithm. It lays the two texts against each other and finds the largest set of lines that match without breaking their order, marking everything else as added or removed.
The practical benefit: when new lines appear in the middle, it doesn't report everything below as shifted. A naive line-by-line comparison treats a single line inserted at the top as though the whole file changed; LCS marks only the line that was genuinely added.
Comparison is at the line level, not the word level. Change one letter in a line and that line shows as "removed + added". For long paragraphs, keeping lines short gives a far more readable result than hunting for the changed word.
When it's useful
- Comparing two account lists. Which accounts were added and which dropped between yesterday's list and today's — visible at a glance.
- Two versions of a text. Finding what changed in an edited article, a contract or a listing.
- Configuration files. Putting a working settings file next to a broken one to spot the difference.
- Verifying an export. Confirming that output came out as expected and no lines were lost after processing a list.
- Duplicate content checks. Seeing how much two product descriptions overlap.
To clean duplicates within a single list, this isn't the tool — the text tools remove repeated lines. This one compares two different texts.
What the ignore options do
| Option | Effect | Turn on when |
|---|---|---|
| Ignore case | John and john count as the same | Email lists, usernames |
| Ignore whitespace | Spacing differences inside and around lines are disregarded | Lists mangled by copy and paste |
Turning both on is the quickest way to separate a "real difference" from a "formatting difference". It removes hundreds of false hits when comparing two lists from different sources.
Invisible characters sometimes create differences you can't see. If two texts look identical on screen but the tool still reports a difference, that's usually why: a trailing space, a tab character, or a different line-ending style — the classic Windows versus Linux difference.
Where do the texts go?
Nowhere. The comparison runs entirely in your browser: neither text is sent to a server or stored. Close the page and nothing is left.
That makes the tool safe for content that shouldn't be shared — contract drafts, account lists, configuration files. Many "online diff" tools upload your text to their server; this one doesn't.
Our privacy page lists tool by tool exactly what is processed.
Glossary
- Diff
- The output showing the difference between two texts, with added and removed lines marked separately.
- LCS (longest common subsequence)
- The algorithm finding the most matching items in two sequences without breaking order. The basis of this tool.
- Line-level comparison
- Looking for differences in whole lines. A one-letter change makes the whole line count as changed.
- Line ending
- Windows ends lines with
CRLF, Linux and macOS withLF. Invisible differences usually come from here.
Frequently asked questions
How does it work?
It splits both texts into lines and finds the longest common subsequence (LCS) to show which lines were added, removed or unchanged.
Can I ignore case or whitespace?
Yes. Use "Ignore case" and "Ignore whitespace differences" to focus only on meaningful changes.
Does it compare word by word?
No, it works line by line. Change one letter in a line and that line shows as removed and added. Keeping lines short gives a more readable result.
The two texts look identical but it reports a difference — why?
Usually invisible characters: a trailing space, a tab, or a different line-ending style (Windows CRLF versus Linux LF). Turn on ignore whitespace to confirm.
If I insert a line in the middle, does everything below look changed?
No. The tool uses the longest common subsequence (LCS) algorithm, so it marks only the line genuinely added rather than treating the rest as shifted.
Can it remove duplicates within one list?
No, this tool compares two different texts. To remove repeated lines inside a single list, use the text tools.
Are my texts sent to a server?
No. The comparison runs entirely in your browser and neither text goes anywhere, so it's safe for contract drafts or account lists.
How long a text can I compare?
Thousands of lines are fine in normal use. For very large texts the tool warns you, because the comparison cost grows quickly with length.