Text Diff Checker
Compare two texts line by line - free, no signup.
What this tool does
Paste your original text on the left and the changed version on the right, and see exactly which lines were added, removed, or stayed the same. This uses a genuine line-matching algorithm (the same family as the 'diff' tool developers use), so a single inserted line doesn't cause every line after it to show as changed.
Compares two texts line by line using a longest-common-subsequence algorithm, correctly identifying matching lines even when content was inserted or removed in between.
Shows added lines, removed lines, and unchanged lines distinctly, with a summary count of each.
Lets you swap the two texts instantly to see the diff from the other direction.
Matches lines with an exact, case-sensitive string comparison, so a trailing space or a capitalization change on an otherwise identical line still shows as a change.
How to use it
- Paste your original text on the left.
- Paste the changed text on the right.
- Review the differences below.
Why use this checker
Finding what changed between two versions of a document or a file by eye is slow and unreliable. A diff shows every added and removed line instantly.
Why we built it
We built the text diff checker on a genuine longest-common-subsequence algorithm, so one inserted line shows as exactly one change. Clean both versions first with the text cleaner and the line and list cleaner.
Related tools worth a look: the Compare PDF.
Who this tool is for
- Writers and editors comparing drafts
- Developers comparing config or code
- Students checking changes between versions
When to use it
- Comparing two drafts of a document.
- Checking what changed in a config or code snippet.
- Reviewing edits from a colleague.
- Verifying two lists are identical.
Why a real diff algorithm matters
A naive line-by-line comparison breaks the moment one line is inserted or deleted.
The simplest possible text comparison checks line 1 against line 1, line 2 against line 2, and so on - which falls apart the instant a single line is inserted or removed, since every line after that point no longer lines up and shows as 'changed' even though it's identical content that just moved. This tool uses the longest-common-subsequence algorithm instead, the same family of algorithm behind the 'diff' command-line tool - it finds the actual minimal set of additions and removals needed to turn one text into the other, so a single inserted line shows as exactly one addition, not a cascade of false changes.
What counts as an identical line
Line matching is an exact, case-sensitive string comparison, not a visual one.
Two lines are only treated as unchanged if they match exactly, character for character - same case, same punctuation, same trailing whitespace. A line that looks identical on screen but has one extra trailing space, a curly quote where the other side has a straight one, or different capitalization will show up as one removed line and one added line, even though a person skimming both texts might call them the same. If you're comparing text pulled from different sources - a PDF export versus a Word export of the same content, say - running each side through the Text Cleaner tool first can eliminate diffs caused by invisible formatting differences rather than actual content changes.
What you give it, and what you get back
| Item | Details |
|---|---|
| Input | Two texts: original and changed. |
| Output | Added, removed and unchanged lines with counts. |
| Notes | Swap the texts to see the reverse. |
Issues you may run into
| What you see | Why it happens | What to do |
|---|---|---|
| Whole line shows as changed | The diff is line based. | Compare the line to find the word. |
| Large files are cut | Very long inputs are compared to a limit. | Split the files. |
| Whitespace differences | Trailing spaces count. | Clean whitespace first. |
Assumptions and limitations
- This compares whole lines - it doesn't highlight which specific words within a changed line differ.
- Very long texts (over 1,500 lines) are compared only up to that limit, to keep the comparison fast in your browser.
Frequently asked questions
How do I compare two texts online for free?
Paste your original text on the left and the changed version on the right - the differences appear instantly below.
Why doesn't this show every line as changed after one edit?
It uses a real longest-common-subsequence diff algorithm, which correctly matches unchanged lines on either side of an insertion or deletion, rather than naively comparing line 1 to line 1, line 2 to line 2, and so on.
Does this show word-level differences within a line?
No - this compares whole lines. A changed line shows as one removed line and one added line, not a word-by-word breakdown.
Is there a size limit?
Texts are compared up to 1,500 lines each, to keep the comparison fast and avoid overloading your browser tab.
Is my data uploaded anywhere?
No. Comparison happens entirely in your browser - nothing is sent to a server.
Does a trailing space or different capitalization count as a change?
Yes - line matching is an exact, case-sensitive string comparison, so a trailing space, a different letter case, or a curly quote versus a straight quote on an otherwise identical line shows as one removed line and one added line.
What does the 'Swap' button do?
It exchanges the original and changed text between the two boxes and re-runs the comparison, so you can see the diff from the other direction without re-pasting anything.